Game Development Community

Player camera that doesn't compenetrate?

by Paolo Parrucci · in Torque Game Engine · 05/27/2003 (8:40 am) · 2 replies

Hello.

I followed the tutorial for keeping the observer camera from compenetrating terrain and objects, and it works fine.

But I wanted to apply that also to the player third person camera, so that if the camera collides with a wall it slides away without compenetration.

Can anybody give me a hand? (btw I suck at programming)

Thanks
Paolo

#1
05/27/2003 (9:13 pm)
If you suck at programming then you better get someone that doesn't first, since making a game without being able to program it's gonna be very hard and probably impossible.
#2
05/28/2003 (8:14 pm)
In abstract terms, you want to cast a ray back from the player towards where the camera will be, then scale the offset of the 3rd person camera by location of the collision point, if any. This will need to be done in C++ to run efficiently.