Get body to roll over curves or terrain

62 views
Skip to first unread message

Jon Grant

unread,
Feb 26, 2016, 4:20:27 PM2/26/16
to Nape Physics
I have a body that I want to roll over a hilly terrain - and always stick to the curve of the terrain - any ideas?  Right now I'm updating the _body.position.x , which is good for flats and slight hills - but I want to make the body always follow the curve 

thanks for any help!

T1m_

unread,
May 11, 2016, 6:33:06 AM5/11/16
to Nape Physics
You can try use material with large mass than you have now. Other way (I could say not so simple way) - raycast from body's center of mass to find position on the surface below it.

Noah Rosenfield

unread,
May 24, 2016, 10:16:28 PM5/24/16
to Nape Physics
i think it depends a bit on what else you have going on and the exact affect desired, but you could use a distance or pivot joint attached to a body below the curve of the terrain which mirrors its movement.
Reply all
Reply to author
Forward
0 new messages