Game Development Community

Respawn problems

by Ronald J Nelson · in Torque Game Engine · 09/04/2007 (6:30 am) · 1 replies

I have missions cars on my map. When they are destroyed they are supposed to respawn where they were. I have using the resources on TDN to do this. However, when my vehicle respawns, it is just at the surface of the terrain. I was using getTransform for the coordinates at the end of onAdd for the vehicle, even tried getPosistion, with the same results. The vehicle uses setTransform for its finally location.

Can someone tell me what I am doing wrong?

#1
09/04/2007 (6:45 am)
I haven't seen that article but what I do for my vehicle spawns, and it works, is to use a spawn sphere (like you would for a normal player) and get the transform of that. Then you spawn the vehicle at those co-ordinates - now you can place your spawn sphere at just the right height so that the vehicle lands comfortably on the ground. In fact, you don't have to use a spawn sphere, any type of marker that doesn't render would do the trick, such as a trigger.