3rd person camera question
by John Eric Miller · in Torque Game Engine · 03/23/2004 (5:40 am) · 12 replies
I want to change how the 3rd person camera and the player interact. I am developing a 3rd person adventrue game where the 3rd person camera looks down on the player in a 3/4 view. Currently this also causes the player to face down toward the ground so when he shoots he fires into the ground. I would like to change the player facing to always remain parallel to the ground independent of the camera angle. So, if the player is running up a hill he will shoot up the hill and not into the ground.
What would I need to look at to make this change? Can it be done in script or would I need to modify some of the engine code? Any help would be greatly appreciated!
What would I need to look at to make this change? Can it be done in script or would I need to modify some of the engine code? Any help would be greatly appreciated!
#2
03/23/2004 (6:39 am)
That resource looks like it will help me with this change. From what I read it doesn't address the aiming of the player. How would I address this issue?
#3
03/23/2004 (10:55 am)
In void playey::updatemove, replaceF32 p = move->pitch;
if (p > M_PI) p -= M_2PI;with F32 p;
p = 0;
#4
03/24/2004 (7:21 am)
Will this make the player always face forward and not look up or down? If so, how could I change it so the player is always facing parallel to the ground, ie facing down will running down hill or facing up when running up hill? I would assume you would need to use the height of the terrain in front of you compared to the hegiht of the train you are standing on and get the angle from that. How would I do this?
#5
03/24/2004 (8:51 am)
This makes it so the player cannot move his veiw up or down. I use this code in my project, and I think its what your looking for. In my codbase, I have a variable so I can switch this on and off.
#6
03/24/2004 (11:26 am)
Are you doing a auto targeting system? How would you handle having to aim up a hill in 3rd person?
#7
Edit:www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=4077
03/24/2004 (4:44 pm)
While auto targeting, I don't have the view locked. If your looking for auto targeting, its a resource. Although you may need to improve the script functions a bit(I did).Edit:www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=4077
#8
03/25/2004 (10:03 am)
I am going for a more arcade type action so I am not using auto targeting. Since I want to do this I am going to need the player to look up when running up hills and look down when running down them. This will enable him to shoot up and down hills. Do you know how I might be able to do this?
#9
03/25/2004 (10:28 am)
Use that code, and add the conform player to terrain resource.
#10
Could you also help me with ther Seperate camera resource? I made comments to my issue in the resource. I appreciate your help!
03/25/2004 (12:01 pm)
Ok thanks, this exactly what I need :)Could you also help me with ther Seperate camera resource? I made comments to my issue in the resource. I appreciate your help!
#11
03/25/2004 (2:48 pm)
The resource workd just fine, make sure you added everything exactly as the tutorials says.
#12
03/26/2004 (6:54 am)
I got it working. Thanks!
Torque Owner Thomas \"Man of Ice\" Lund