Advanced Camera getCameraPosition returns 0's?
by Terence Tan · in Torque Game Engine · 04/19/2006 (2:26 am) · 2 replies
I implement Thomas Lund advanced camera and I am trying to spawn an AI on the current camera position.
I tried this on the console LocalClientConnection.advcamera.getPosition() and got 0,0,0 ...? I am putting the camera in Orbit mode if that makes a difference?
Im also trying to change way the player controls the avatar. Instead of the standard WASD FPS controls. I want to stick the camera in over head 3rd person and use WASD to move the player up/down/left/right accordingly. Is that possible in script. I understand the client allow specification of unit vectors in movement. Would I have to calculate the specific unit vectors depending on the characters facing? (i.e. if the character is facing right...hitting W would make the character move right). I am fine with typing the mouse to rotate the camera as it is by default.
I tried this on the console LocalClientConnection.advcamera.getPosition() and got 0,0,0 ...? I am putting the camera in Orbit mode if that makes a difference?
Im also trying to change way the player controls the avatar. Instead of the standard WASD FPS controls. I want to stick the camera in over head 3rd person and use WASD to move the player up/down/left/right accordingly. Is that possible in script. I understand the client allow specification of unit vectors in movement. Would I have to calculate the specific unit vectors depending on the characters facing? (i.e. if the character is facing right...hitting W would make the character move right). I am fine with typing the mouse to rotate the camera as it is by default.
About the author
#2
That was it. Found your resource update a little bit further down. Thanks for taking the time to help me.
04/19/2006 (8:06 am)
Yep, That was it. Found your resource update a little bit further down. Thanks for taking the time to help me.
Associate Manoel Neto
Default Studio Name
A quick fix is make it reposition itself to it's playerObject position during the processTick, on the server.