chipmunk-rb / chipmunk-ffi

chipmunk ruby bindings using ffi
26 stars 6 forks source link

CP::Body#m= and #i= should use cpBodySet* functions. #1

Closed erisdev closed 14 years ago

erisdev commented 14 years ago

I had a look at the code and noticed that you're directly setting the mass and moment values rather than going through the C accessor. In this case, the values in the struct shouldn't be directly modified because the accessors also set m_inv and i_inv to save calculation time for functions that need them.

erisdev commented 14 years ago

Just fixed it myself, I think. We'll see.

shawn42 commented 14 years ago

pulled and merged your fix, thanks!

erisdev commented 14 years ago

Glad to help, of course. :)