[ODE] Re: Build Model

Adam Rotaru adam_rotaru at yahoo.com
Thu Jan 23 09:10:02 2003


> From: "Marco Vienup" <Marco@vienup.de>
> Date: Wed, 22 Jan 2003 20:53:40 +0100
> Subject: [ODE] Build Model
> 
> When the simulation starts everything looks fine.
But then 
> the boxes moves around the hinge axis. I think its
correct, but
> not what I want.
> 
> So my question is: 
> How must I build my model with rotated elements at
the begining ?
> 
> Thanks 
> Marco

Hi,
You have to rotate (and move) the axis of the joint as
well, 
before connecting the objects.
Let's say P1,R1 is the original position of one
object,
P2,R2 is the original position of the other object,
and the original axis vecor is A.
You want to rotate everything by R, and translate with
T.

- create body1
- set it's position to P1+T, its orientation to R*R1
- create body2
- set it's position to P2+T, its orientation to R*R2
- create the joint, with axis R*A

Hope this helps,
--Adam



__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com