World coordinates
by DejaBlue · in Torque Game Engine · 12/01/2005 (7:23 am) · 2 replies
Been looking around on GG for a resource for world coordinates. what i am trying to achive is to get players X, Y location into a numeric type number. for example as you move might be x 35 y 56. what i am trying to do by end of this is to have a location with my Overhead Map showing in text our location and updates as we move.
anyone happen to be able to help out, it would be very appreciated.
anyone happen to be able to help out, it would be very appreciated.
About the author
Torque Owner Robert Geiman
// This should be the last line in createPlayer:
$myPlayer = %this.player;
// This function can go anywhere in game.cs
function printPlayerPosition()
{
%pos = $myPlayer.getTransform();
%x = getWord(%pos, 0);
%y = getWord(%pos, 1);
%z = getWord(%pos, 2);
echo("Player Pos: x=" @ %x @ " y=" @ %y @ " z=" @ %z);
}