MADEAPPS / newton-dynamics

Newton Dynamics is an integrated solution for real time simulation of physics environments.
http://www.newtondynamics.com
Other
928 stars 183 forks source link

Roller joint limits #312

Closed lperkin1 closed 1 year ago

lperkin1 commented 1 year ago

The demo for the roller joint doesn't seem to be limiting the object's movement or rotation.

I removed all the other joint examples and the spring damper. So the object should be limited to (-1, 1). Here's what I get.

Starting position image

Outside limits image

It's harder to see, but the rotation limits also don't lock the rotation. Am I missing something?

lperkin1 commented 1 year ago

Looks like I'm getting the same situation with the ndJointCylinder.

JulioJerez commented 1 year ago

ah my mistake, the roller joint is very similar to the cylinder, the different is the pin axis dof, It seemed I copied and pasted the code from cylinder, I do not really remember now, it was so long ago. The cylinder seem to be correct I just tested it. and I fixed the bug with the roller.

Please try again. Julio

lperkin1 commented 1 year ago

It's working. Thanks!