jerome Posted January 21, 2014 Share Posted January 21, 2014 Hello, API documentation says for Class:Body : Properties:Name Type Descriptionvelocity Phaser.Point The velocity in pixels per second sq. of the Body. per second squared ? Distance par second squared is usually an acceleration unit.Is velocity really expressed, for some reason, in px/s² ? I need to precompute some time of moving for a sprite from its velocity :timeToX = distanceToX / sprite.body.velocity.x; Link to comment Share on other sites More sharing options...
jpdev Posted January 21, 2014 Share Posted January 21, 2014 I think that's just an error int the docs.(Possibly introduced by copy & paste, maybe the docs for gravity or acceleration have been copied over and the "sq." has been left by accident) Your formula should work correctly. Link to comment Share on other sites More sharing options...
Recommended Posts