Game Development Community

Aligning items.

by Maddermadcat · in Torque Game Engine · 12/06/2007 (2:30 pm) · 1 replies

I have timed explosives set up. Each explosive is simply a sticky item. Anyway, I was wondering how I can make the sticky item align to the surface it's stuck to, so it doesn't go through walls and such.

#1
12/07/2007 (9:25 pm)
Here's a recent post with 2 links on the subject of aligning objects to a surface. In this case, it's for aligning the Player object to the terrain, but the actual math should be the same.

garagegames.com/mg/forums/result.thread.php?qt=68709

*edit:
Forgot to mention that corpses also do pretty much what you want. Take a look at the code that makes them conform to the ground.