Game Development Community

vertical movement of player in Physical Zone

by Naveen kumar · in Torque 3D Beginner · 12/03/2013 (8:19 am) · 1 replies

I am creating a game in which i have set a vast physical zone and set the gravity to 0.
but what i want is , "IN WHICH DIRECTION I AM POINTING MY MOUSE, THE PLAYER HAS TO MOVE IN THAT DIRECTION. if i am pointing upwards, then moving up, if i am pointing downwards, then moving down"

Pls help me with this....... how to do it
is there any method to get and set the player positions in torque 3d

i mean like

player.setPosition(1,2,3);
and
echo(player.getPosition());

is there any such functions or do i have to change the c code for it.
pls help me asap

#1
12/04/2013 (12:28 pm)
Yes:
// assuming %player is assigned an instance of a Player object:
%3dPosition = %player.position; // gets player's (x y z) coordinates (space separated values)
%player.position = "10 10 10"; // places player at (10 10 10) x,y,z (space separated values)