schteppe / p2.js

JavaScript 2D physics library
Other
2.63k stars 330 forks source link

Toggling fixedX and fixedY on and off #340

Closed anton980 closed 5 years ago

anton980 commented 5 years ago

Hello! I am trying to toggle the fixedX/Y properties on runtime and it's having no affect on how the body behaves.

Is there a trick to doing that?

Thank you!

schteppe commented 5 years ago

Yes, check the docs: https://github.com/schteppe/p2.js/blob/2beb2750f42d29014e289cb803b7269d5b0edaad/src/objects/Body.js#L174-L187