[ODE] camera flight

Michael Scharvogel thubba at gmx.net
Tue Dec 10 07:45:02 2002



Thanx Allen but I had tried this with the same effect. In every Simulation
step I queried this value in the same way.
But unfortunately I always received the same value. I thought the reason for
this to be the const return value (as I always seem to get the position
where I generated the body). therefore I tried the RelPos Thing, but didn't
succeed...


Can anyone help me ???


>
> const dReal *PosA = dBodyGetPosition (myBodyID);
>
> Allan Simonsen
>
----- Original Message -----
From: "Allan Simonsen" <Simonsen@rocketmail.com>
To: "Michael Scharvogel" <thubba@gmx.net>
Sent: Tuesday, December 10, 2002 2:15 AM
Subject: Re: [ODE] camera flight


> >
> > I just wanted my viewport to accompaign my robot.
> > Thus I got a geometries position and set the
> > vieports xyz pos to the bodies pos (just for the
> > moment to give it a try). It worked fine just until
> > my robot started to move (by hinge movement). As the
> > getPosition method returns a const value, the
> > position doesn't update. Then I tried something like
> >
> >  dVector3 camPos;
> >  dBodyGetRelPointPos(myBodyID, 0, 0, 0, camPos);
> >
> > and set the Viewport to this position. Nothing
> > changed as this point also seems to stay the same.
> > the adjustment of the camera pos works, as I am not
> > able to move the camera by mouse movement.
> >
> > So how do I get the current Position of a Body.
> > Or can anyone support me with an alternative way to
> > achive this camera flight ???
> >