Game Development Community

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

#1
08/08/2005 (6:35 am)
Ok... I had a similair issue... Particularly, to shoot straight ahead you have to look through the players back, which is annoying as hell. So I sought (and found) a way to position the camera by offsetting it upwards a bit...

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.
#2
08/08/2005 (6:53 am)
That's just what I needed, Thanks Chris
#3
08/08/2005 (7:01 am)
No problem :)