hinge position

amaury

16-06-2006 01:16:56

Hello,

I'd like to joint two vehicles with an hinge... but i don't really understand how to setup where the hinge is linked on the vehicles.

OgreNewt::BasicJoints::Hinge *joint=new OgreNewt::BasicJoints::Hinge(m_World,mCar->getChassisBody(),mCar2->getChassisBody(),Vector3(2,0,0),Vector3(0,0,1));


Thanks :)

amaury

18-06-2006 15:34:30

please answer, i'm lost....
I've read newton docs, newton wiki, this forum, the documentation on the ogrenewt in the code but i still can't manage to make it work like i want

amaury

18-06-2006 15:37:50

well, and I also looked the demos :(

walaber

18-06-2006 18:40:28

the "pos" is the GLOBAL location of the center of the hinge. you should find the position between your 2 cars where the hings will be located, and pass that.

the "pin" is the line around which the hinge will rotate, in GLOBAL space. so for a door, it would be something like (0,1,0) (assuming Y us UP in your world).

amaury

21-06-2006 10:57:42

okay thank you very much :)

I think I understand a little bit more :)