[ODE] Camera movement?
jean-sebastien.guay at polymtl.ca
Sun Mar 12 20:46:34 MST 2006
As mentioned in another message, I'm working on a submarine arcade type game.
It's using a third-person camera which I would like to follow the player's sub
kind of in a "sloppy" way, meaning that it always follows it but that if the
sub turns too sharply it has a hard time keeping up and then comes back on line
with it after a short moment. I would also have to take care of collision
detection for the camera since an object could lie where the camera should be.
I thought of using a ball joint for the motion, attached to the camera and the
submarine, and then giving the camera a small sphere geom for collision
detection. But I wonder if a joint (ball or any other type) can leave space
between the two bodies, or if they have to be physically touching? I would need
to keep a more or less constant distance between the two bodies to be able to
see around the sub.
What I thought of doing is to create two "virtual" bodies that would represent
axes that come out of the objects (behind the sub and in front of the camera)
and attach those with the joint. These bodies would just never be shown.
In the end, would something like that work? Or can you suggest another way?
Jean-Sebastien Guay jean-sebastien.guay at polymtl.ca
More information about the ODE