Camera and animated mesh

Blitz3D Forums/Blitz3D Programming/Camera and animated mesh

mearrin69(Posted 2004) [#1]
Hi all,
Maybe someone knows this off the top of their head.

I want to have a camera aligned from the point of view of my model's head...turning and moving as the model animates.

Before I do a lot of experimenting, can this be done by choosing a vertex and getting that vertex's position and normal each frame and then applying that to the camera's position and orientation?

The position issue seems easy enough but how do I align the camera to the vertex's normal direction? Are normals recomputed as the model moves (B3D format entity here)? Anything else tricky with doing this?

The goal is applying a sort of natural head motion to the camera view for a character's eye view of the action. Any help would be appreciated. Thanks.
M


Bot Builder(Posted 2004) [#2]
Well, since the mesh is animated, you should have some bones set, correct? well, you can do a hierarchal search of the mesh(its children, and its children's children, and its children's children's children, etc.) to find the bone that represents the head. then, every game loop, retrieve the heads position and rotation and apply that to your camera.