Game Development Community

Questions on Third Person Camera attached to Player Eye Node

by AndrewOsborne · in Torque Game Engine · 01/15/2006 (6:50 am) · 1 replies

Hi,

I have been trying to get the Third Person camera to track a point above the eyenode of the model, i think it lwill look much better if the player isnt focused on the back of the models head. I toyed with the idea of moving the eye node above the model, or creating another node, but i would prefer to do a transformation in code so i can make it an adjustable value.

I had tried to be sneaky and just modify the script line

(game.cs Ln322)

// Update the camera to start with the player
%this.camera.setTransform(%player.getEyeTransform());


// Update the camera to start with the player
%this.camera.setTransform(%player.getEyeTransform() + " 0 0 0 0 0 10 0");

there were no errors, but also no visible changes.

I imagine the problem might lie with the node being constantly updated and my changes not being.
Another though i had was that i could not perfom the matrix transforms in script, and that i would need to link a new function with my transform modification in it, to the script, and call that instead.

And ideas/theories would be appreciated.

#1
01/16/2006 (10:58 am)
The camera object itself has a third person offset, you should try modifying that value.

Alternatively you could look at the various modes of the AdvancedCamera resource, one of which might do exactly what you want.