How do I make an object destroy with force/pressure?
graapl
Member, PRO Posts: 29
I am making a platformer. The object I would like to destroy is a moveable square crate. I want it to be destroyed when it hits the floor with (whateverforce) or something hits it (like the main character) with (whateverforce). PLEASE HELP!!!
Comments
linear.velocity.X + linear.velocity.Y
So you can use that number to check if it should break or not, like:
1. make a new real attribute called mySpeed.
2. set the value of mySpeed to your actors linear.velocity.X + linear.velocity.Y.
3. then if that crate actor collides with your ground (or whatever) AND its mySpeed is greater than a certain value, break the crate.
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page