Problem with 'setCameraObject'
by Nicolai Dutka · in Torque 3D Beginner · 05/13/2010 (3:56 pm) · 3 replies
I've been using code for quite a while now that will set a control object separate from a camera object so it looks like you are controlling an object remotely. I haven't tested in a while so I don't know when this started happening, but I cannot get my camera to stay on the player.
I am using:
$client.setControlObject($controlObject);
$client.setCameraObject($player);
It used to be that, that code will let me use my $player as the camera and $controlObject will move around in front of me using the keyboard controls.
Now, no matter what I do, setControlObject automatically sets the cameraObject too! If you run just the first line, the camera snaps to it right away. Running the second line is supposed to set my camera back to the original object, but it isn't working anymore!
I can tell you this:
We did switch from TGEA over to T3D about 5 months ago... Is there something in the T3D engine that is forcing my camera object to always be the same as the control object?
I need this ASAP!!!!
Thanks in advance for any help!
I am using:
$client.setControlObject($controlObject);
$client.setCameraObject($player);
It used to be that, that code will let me use my $player as the camera and $controlObject will move around in front of me using the keyboard controls.
Now, no matter what I do, setControlObject automatically sets the cameraObject too! If you run just the first line, the camera snaps to it right away. Running the second line is supposed to set my camera back to the original object, but it isn't working anymore!
I can tell you this:
We did switch from TGEA over to T3D about 5 months ago... Is there something in the T3D engine that is forcing my camera object to always be the same as the control object?
I need this ASAP!!!!
Thanks in advance for any help!
#2
06/15/2010 (10:06 am)
Bump again... Please!?? Pretty please? Anyone?....
#3
We had changed our design so the view NEVER toggles to third person view. I did a simple view toggle and POOF, it's working again.
Glad I got it working, but now my whole design is screwed up... Is there something I can change in engine source code that will allow me to do what I need WITHOUT switching to 3rd person?? Please? :P
06/15/2010 (11:05 am)
O...M...G..!! It's due to "toggleFirstPerson(1);"We had changed our design so the view NEVER toggles to third person view. I did a simple view toggle and POOF, it's working again.
Glad I got it working, but now my whole design is screwed up... Is there something I can change in engine source code that will allow me to do what I need WITHOUT switching to 3rd person?? Please? :P
Torque 3D Owner Nicolai Dutka