Problem walking on terrain with tree collision

alejandro

27-07-2006 23:25:32

i have been working with the same problem for a long time , and i couldnt find answers in the fourums

look , i'm trying to control my character , i have set up all the newton world and the materials ,

i have a terrain ( mesh ) with a TreeCollision , and the character has a Ellipsoid ,

i have seem that when the character touchs the edges of the TreeCollision (subdivisions ) , the character start to rotate , so my character is always rotating in the terrain ,

i have tested runing over a Box collision , and it's works fine , becasuse it hasnt edges nearly , just in the end when the character fall , the character rotate , so, is in the edges that the problem happen .


was going on ????
any answers could be helpful

OvermindDL1

28-07-2006 03:40:16

Tried setting the rotation friction higher (is there such a thing, or just normal friction...)?

nickgravelyn

30-07-2006 06:08:19

What you need to do is add an UpVector constraint to your character like this:
new OgreNewt::BasicJoints::UpVector( mNewtonWorld, yourBodyHere, Ogre::Vector3::UNIT_Y );

That way, your character will always stand up straight. Hope that helps.

lonwolf

14-08-2006 17:05:23

it stays up, but thats it. In that way especially if the body is elipsoid, the character will continue to rotate in a very weird way... I solved the rotation problem with a compound colision by helping the elipsoid stay up using 4 small spheres and removed the upVector..