Thursday, 10 November 2016

Adding movement

Previous: our simple game

To add movement to our box. We will add gravity to allow free fall of our box. The box will continue to fall till it comes across an obstacle. In our case, we need to capture the box

Select the box. Move to the inspector panel and add component. Select Rigidbody and not Rigidbody2D since it is a 3D game object.

Don't change the settings. Ensure Use gravity is ticked. Also ensure Box collider is present. Don,t tick "is trigger". This would cause our box to pass the catch up box.

Select catch up and make sure box collider is added and "is trigger" is disabled. Don't add Rigidbody as we don't want this box to fall.

Click the play button and watch the box fall down.

We need to redefine our game and make it more interesting hence need to update our story line. Every game is developed along a story line. This makes it easier for you to update the game without changing the original game plan.

Next: redefining story line

No comments:

Post a Comment