Game Development Community

3rd person camera question

by John Eric Miller · in Torque Game Engine · 04/23/2003 (7:42 am) · 5 replies

I want to be able to control the 3rd person camera with the mouse like the default settings in the examples but I don't want the change in the camera angle to change where the player is aiming. I want the player to always aim to the front. How would I go about changing this?

Thanks!

#1
04/24/2003 (3:33 pm)
When you say always to the front, do you mean the player is going to aim in one direction all the time? Like Space Invaders? If all you want is for the player's aim to not move vertically, I can help you.
#2
04/24/2003 (4:20 pm)
Yes, I mean that the players aim not move vertically but still able to move the camera up so you are looking donw at an angle on the player.

Thanks
#3
04/25/2003 (7:05 pm)
Alright, for future reference, if you want to lock the player's aim vertically, put this script in the PlayerData data block, in player.cs:

minLookAngle = 0;
maxLookAngle = 0;
maxFreelookAngle = 3.0;

This may also lock the camera from moving, so it doesn't necessarily solve Eric's problem.
#4
04/26/2003 (9:38 am)
Does anyone know the answer to my question?

Thanks
#5
04/27/2003 (3:57 am)
I got assistance from the garagegames forums from DJMystic. Basically I had to change how the weapon fired, so I changed the onFire event for all my weapons to always fire straight and not based on the angle of the camera. This now gives me a 3rd person camera that can be adjusted with the mouse but the player doesn't shoot into the ground when I am looking down on the player at a 45 degree angle.