Game Development Community

Game not using exported Cam node of player correctly or at all

by Rick Kelley · in Torque Game Engine · 04/05/2006 (10:00 am) · 5 replies

I have created my own player, and have gotten everything to work perfectly, so I may not be understanding how the Cam node really works. I switch to 3rd person view, and use my player to walk, sidestep, and go backwards. All goes according to how it should except that I have try to set the "Cam" node to rotate and go to the players front so you can see what it sees backing up. I have set animation sequences to do this.

For some questions that may get asked:
I am using the Max dts exporter.
My dump file says its exporting the Cam node.
Yes I have my "Cam" node linked to the "Unlink" node which is in turn linked to the "Bip01" node.
My "Cam" node is inside of the bounding box for the player.dts file and the player_root.dsq file, and player_back.dsq file.
My "Unlink" node seems to be partialy out of the bounds box. (but so is the "unlink" node like this in
the example file provided by GG).

#1
04/05/2006 (10:05 am)
As far as I know only the position of the cam node is used. The camera will always look AT the node, but the cameras actual position is controlled somewhere within the scripts.
#2
04/05/2006 (12:38 pm)
I have looked in the scripts seaching the letters "cam" and found nothing really helpful. I did find something that toggles firstperson mode, but this seems to switch control to the fly mode camera. Nothing with the a chase camera. I am at loss. Unless this is going to have to be code specific in the game core. Anyone else have any ideas?
#3
04/05/2006 (12:47 pm)
@Rick: I'm pretty sure Magnus is right, the rotation is controled via the mouse, and only the position of the node is used, so you'll want to apply an additive 180 degree camera rotation during the 'backup' event. I'm not sure if this can be completely done in script, but the player.cc is a good place to start if you're familiar with C++.

You should also take a look at the 'advanced camera' resource(do a search), and see if you can modify it to suit your needs.
#4
04/05/2006 (12:51 pm)
Yeah, it seem to be a pretty messy combination of script and C++ now when I look at it. I don't have time to sort it out right now but player.cc is probably a good place to start.
#5
04/05/2006 (6:33 pm)
Yep I thought as much, I did a search and came up with some camera functions in the core source so this wouldnt be the place to discuss it since if I am correct, a public area that unlicensed users can see. Thanks, and I may post something if I have questions in the private areas. Or even perhaps share what I found out if succesfull.