Game Development Reference
In-Depth Information
What just happened?
Staring from the end, we wanted the whale to interact with the world around it. For tesing,
we placed our character and an object to help us interpret a barrier (a big iceberg or whatever)
which makes the character go back to the posiion where it was. To do this, we had to change
the type of physical play and adjust to dynamic. Thus, we can get contacts, and our character
collisions with other objects can be calculated to give the answer that we assign. In the
previous exercise, the whale returned to the old posiion it was in before the collision.
Pop quiz - respawning the character
1. If you want to create a collision, which object has the connecion in the logic brick?
a. The whale
b. The iceberg
c. Both
2. Which sensor would you choose if you wanted to make a crash?
a. Collision
b. Touch
c. That is immaterial
3. Which type of collision needs an object response?
a. Staic
b. Dynamic
c. Doesn't mater, it only afects the player
Have a go hero - doing it better
There are many possibiliies for creaing collisions. We can use distance, as we did in the
example, but can we also create a change in direcion (for example, when using a ball or
returning the character to a specific point of the stage, perhaps a check point).
If we are in a forest, some trees may be in the path of our character and others may not.
It is much easier to apply a material to certain objects that we want our character to react
to, and therefore not create acions for the logic bricks of other objects. Although this
material may not be seen, it is perfectly useful for collisions of the objects with the material,
regardless of the type of the object that you see (including if we want this object to be
invisible to our player). Try choosing a specific material in a box of a sensor brick. You can see
that the character reacts to only the object that has collided with the material you specified.

Custom Search