Game Development Community

Conform to Terrain, but not Camera?

by Chris "C2" Byars · in Torque Game Engine · 06/29/2005 (4:50 pm) · 2 replies

Referring to this Resource, the player conforms to the terrain, yes, but the camera does as well, smoothing or not.

I am not a C++er, so I was wondering if anyone out there would know how to get the camera to simply follow the player and not bounce around and conform as the player does? So the camera doesn't change angles or anything in 3rd person?

#1
06/30/2005 (6:04 am)
Why you should want your camera to have the same rotation as your model? Think about a higly irregular terrain, will the player like to see the camera shaking like an earthquake trying to follow the player model?
In plus, consider if you are using 3rd person, imagine having a series of climbs and reductions, the player model will be on the second climb while the camera will be yet in the first reduction, going under the terrain.
By the way, if you really want this, you only have to find a method to have fixed yaw for your camera (in example, disabling the mouse yaxis-doyaw binding or commenting out the doyaw function, or both).

Bye, Thc.
#2
06/30/2005 (6:10 am)
What you really need to do is find where the camera transform matrix is being set and don't set the first 2 colums... then your x and y rots wlil be fixed.

Alternatively. you oculd write a camera stabalizer... averaging out hte last x camera transforms. About 10 will probably do it. Then you will get nice smooth transform from one trans to the next.

I have done extensive work with this resource. If you need something omre concrete, I can give you better examples, but I am not at my game dev work station right now, so it will have to wait.