How do I make an object destroy with force/pressure?

graaplgraapl Member, PRO Posts: 29
edited July 2013 in Working with GS (Mac)
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

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772
    You can get the speed at which something is moving by doing:

    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.

Sign In or Register to comment.