Using collision sensors

In most platform games, when the player's character passes a collectible item, it doesn't normally bump into it and stop. The player will run straight through the item, collecting points as it passes, and the collectible item will disappear so that it can't be collected more than once.

We know from the previous game test that when our monkey collides with a piece of collectible fruit, it crashes into it and stops, or lands on top of the fruit if the monkey is jumping. We need the collision to be detected so that our game can reward the player with a bonus, but we don't want to stop the flow of the game by having to stop and start the monkey each time a piece of fruit is collected.

When we want a collision to be detected, but not cause a physical reaction in the game, we need to specify that the colliding actor is a sensor.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.222.210.219