Spawning on top of another object. Getting stuck.
by Robert Brower · in Torque Game Engine · 01/22/2003 (9:03 pm) · 1 replies
I placed a spawn sphere in my map but I have asteroids floating around and there is the possibility that one will be at the spawn location when I respawn. When that happens, I get stuck and I cannot move.
Is it feasible to do a radius search at the spawn sphere in a loop until it is confirmed to be clear before proceeding with creating a player there? Anyone have any problems with this?
Is it feasible to do a radius search at the spawn sphere in a loop until it is confirmed to be clear before proceeding with creating a player there? Anyone have any problems with this?
Associate Kyle Carter
I'd put it so that the code tries three or four randomly chosen points, and if they don't work, then it tries again later (either by telling the user, no dice, and then trying again when they click, or by scheduling a call back in a half a second or so.)