Game Development Community

Breaking the environment

by Banshee · in Torque Game Engine · 12/05/2004 (6:23 am) · 5 replies

Ok, here is my situation:

I have sign posts next to my roads in my game, as I am driving along the car swings out of control and I hit one. Is there some way I can make it snap in half?

I have the main shape and two seperate shapes which would be the two halfs, but how would I go about coding it to do that?

Also I would like the pieces to bounce around and then fade away just like debis, so how would I go out turning my one shape into two debis?


Sorry for the weird way of stating my problem, I just don't know any other way of putting it :P

Thanks
-Banshee

#1
12/05/2004 (6:26 am)
Quote:Is there some way I can make it snap in half?

You can script it so that when something collides with it you can either replace the shape immediately, or play an animation of the shape "breaking".
#2
12/05/2004 (6:28 am)
Yes, but I would like it to become to debris shapes, so it has a nicer effect.
I just don't know the best approach of spawning them
#3
12/05/2004 (7:12 am)
Use a trigger so that if it is touched that the signpost object removed and then particles start, you will ned to customize the particles a little, but I imagine that it is posibble.
#4
12/05/2004 (2:00 pm)
Search around the forums for breaking glass. I'm sure you will find what you are looking for. The one I found that comes to mind uses debris data to create the falling glass, allowing it to spin and bounce off of other objects.

-Jase
#5
12/05/2004 (2:27 pm)
Okay, here we go. I did some quick searching and this thread turned up: www.garagegames.com/mg/forums/result.thread.php?qt=15790. That should get ya going.

Hope it helps.

-Jase