3rd person shooter
by Brendan Dillon · in Torque Game Engine · 08/08/2005 (6:16 am) · 3 replies
Hi
I'm hoping someone can point me in the right direction. I'm working on a 3rd person game based on the fps starter kit, the problem I'm having is that the players aim is determined by the direction of the camera and as I've placed the camera behind and above the player he is now just firing into the ground.
If anyone knows of a way to get around this problem I would be very grateful for your help.
Brendan
I'm hoping someone can point me in the right direction. I'm working on a 3rd person game based on the fps starter kit, the problem I'm having is that the players aim is determined by the direction of the camera and as I've placed the camera behind and above the player he is now just firing into the ground.
If anyone knows of a way to get around this problem I would be very grateful for your help.
Brendan
About the author
Torque Owner Chris Labombard
Premium Preferred
Simple enough to do, just open your compiler... navigate to game/ShapeBase.cc and find the camera transform junk. Should be something like getCameraTransform method. You will see x = y = 0; and some other stuff. Now, keep in mind I don't have code with me here, but I simply added an offset of (I think it was 3) to the z value to offset the camera above the players head.
Now, it could have been y.... But htat makes no sense, since z is up / down in TGE.
:) Hope that helps you.