Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Physics.Arcade.Body's speed property is only set when the body moves #2417

Closed
mark-henry opened this issue Apr 5, 2016 · 1 comment
Closed

Comments

@mark-henry
Copy link

This if guard erroneously guarantees that the body's speed property is not set to zero when the body stops.

if (this.position.x !== this.prev.x || this.position.y !== this.prev.y)

guards the setting of the speed and angle properties. This was probably intended to avoid bugs when setting the angle property but should not guard the speed-setting line.

Suggest that the speed-setting line be moved out of the if statement.

@photonstorm
Copy link
Collaborator

Agreed, Fixed in dev.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants