Game Development Community

Tile Collision Info

by Pete111 · in Torque Game Builder · 03/04/2005 (2:27 pm) · 5 replies

Hi - I got my little map scrolling and the player can collide with the map but now I need my player to stop moving when it hits a wall. I'm guessing I need to then find the world pos of the tile hit and compare to world pos of the player??

THANKS!

#1
03/04/2005 (3:01 pm)
Nevermind - it looks like the last arguements in the collision callback are world locs...
#2
03/04/2005 (3:06 pm)
Nevermind - it looks like the last arguements in the collision callback are world locs...
#3
03/04/2005 (3:12 pm)
OK but now how do I get the x and y from the last arguemtent in the collision callback????

ala... echo("contactXPoint=" @ %contactPoints[1]);???? this doesnt spit anything out
#4
03/04/2005 (5:48 pm)
%x = getWord(%contactPoints,0);
%y = getWord(%contactPoints,1);
#5
03/05/2005 (4:49 pm)
Thanks!