schteppe / p2.js

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

Is it possible to get the force of body directly? #350

Open csycs opened 4 years ago

csycs commented 4 years ago

I want to get the force of body, how do i get this value?

jebito commented 4 years ago

body.force[0] for "X" and body.force[1] for "Y"

csycs commented 4 years ago

but body.force will be reset after every step. Now, we get the force through constraint.equations.multiplier. Thank you~

jebito commented 4 years ago

Thanks for the info