State change in game objects: Part 2

Box Smash.gif

Since the last lesson of with Ant I’ve been at work creating breakable crate, after extensive research I had found a few ways to do this, you can use the engine and code the box to break after creating two instances of it (one broken ad one not) or you can  animate the actual breaking of the box in Maya. As you can see in the Gif I used the game engine to do mine.

First I modeled the two versions of the crate.

Box two.gif

Both exactly the same but one made in separate, broken pieces, the other not.

I then added Rigid Bodies and colliders  to the boxes AND EVERY SINGLE PIECE.

And to do the hard work I made a bit of code.Capture code.PNGA very simple bit of code that had taken me an ungodly amount of time, however I am not afraid to admit that as I am very happy with the result, a simple skill to have learned that may now allow me to create a ratchet and clank esc scene to impress interviewers. I will make future posts if I decide to make that a side project of mine.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s