[ODE] Player camera

William Denniss william.denniss at omegadelta.net
Wed Sep 15 23:12:26 MST 2004


On 15/09/2004, at 4:51 PM, Brian Clarkson wrote:

>
> William wrote:
>
>> I have a Geom (in a GeomTransform) attached to the body which I call
>> the ChaseTarget.  It is not attached to any Space, so does not collide
>> and it's always at a set distance from the Body (off topic, as I 
>> define
>> it in XODE, it makes it very simple to move the camera around - no
>> recompile necessary).
>
>
> William
>
> How are you attaching the case target. I think this is clever. Would 
> like to
> try it
> in my sim. Seems to me its all in the case target attachment.

I added a GeomBox to a GeomTransform, set an offset then attached it to 
the body in question - but not to any space (don't want any collision 
with the target!).  If you haven't used GeomTransforms before, you can 
search the list archives there are a few good examples.

In actual fact, as it has no impact on the simulation you can simply 
have an offset vector which is your target (e.g. the position of the 
body + (0,5,-10) ).  I use this approach for two reasons - one I could 
just add the geometry into my XML file very easily, and second as I can 
automatically generate graphical representations of the geometry, I can 
easily see the target and visually confirm my camera is indeed chasing 
the right thing.

Cheers,

Will.



More information about the ODE mailing list