Game Development Reference
In-Depth Information
Let's go back to our Kevin actor, and outside of the controls group, drag in a
Collide
behavior, and all you have to do is change it to
Bounce when colliding with
|
actor
with tag:
|
Platforms
. Now, whenever he collides with an actor that you dragged
into the
Platforms
section, he will stop. Test it out to see how it works.
Bounce! Bounce! Bounce! We need to adjust a few things in the
Physics
section of
the Kevin actor, and also the Platform actors. Open up one of the Platform actors
(it doesn't matter which one, because we are going to change them all), in the
Attributes
window, open up the
Physics
drop down, and change the
Bounciness
value to
0
. Or if you want it to be a rubbery surface, you can leave it at
1
, or even
100
, whatever you like. If you want a slippery platform, change the
Friction
to a
lower than one value, such as
0.1
. Do the same with our Kevin actor. Change his
Bounciness
to
0
, his
Density
to
100
, and
Friction
to
50
, and check off (if not already)
the
Fixed Rotation
, and
Movable
options. Now test it out. Everything should
work perfectly!