Wednesday, August 12, 2015

Self bouncing balls

To make the game more interesting, I’ve decided to have the balls bounce along too.

They also will use the floor to jump, when they are just about to come into contact with the floor it deforms beneath them, then they let go launching the ball into the air.

To do that we have the balls look down and to the right, when we detect that the ball is going to come into contact with a floor tile, we send that floor tile a message to start sliding down. It will then slide down the adjacent floor tiles too.

Ball being launched by the floor

Code sending the message to the collider to start swipe down


Here is a video of the balls bouncing by themselves.