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
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
About the author
#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.
Torque 3D Owner Xavier "eXoDuS" Amado
Default Studio Name