1 decade ago by spacelime
I've noticed that the higher gravity, the faster the entity moves downhill and the slower it moves uphill. I want my entity to always move at the same speed in the x axis, how can I accomplish this?
This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact
.vel.x
manually. update: function() { // move left or right // if( ig.input.state('left')) { this.vel.x = -this.speed; } else if( ig.input.state('right') ) { this.vel.x = +this.speed; } this.parent(); }