1 decade ago by paulh
I was expecting the following code (even without changing gravity) to make the player float right at a constant height and velocity .. any ideas why the player "drops down"?
ig.module(
'game.entities.rgustus'
)
.requires(
'impact.entity'
)
.defines(function(){
EntityRgustus = ig.Entity.extend({
_wmScalable: true,
_wmDrawBox: true,
_wmBoxColor: 'rgba(25, 20, 260, 0.7)',
checkAgainst:ig.Entity.TYPE.A,
update: function(){},
check: function(other){
other.gravityFactor =0;
other.vel.x = 150;
other.pos.y =200;
ig.game.gravity = 0;
}
})
});
