Provides a constant pull on objects in a particular direction.
Category
Latest Behaviors
Author
Gavin Kistner
Difficulty
(Reference)
Time to Complete
5 Minutes
Downloads
Click Here
to download the associated files.
(This document covers version 1.0.4 of the 'Gravity' behavior, current as of 2005-Aug-04)
Description
Attach this behavior to an object to make it feel the
effects of gravity. The object will be constantly accelerated
in the direction indicated by the
Gravity Direction
parameter, at a rate specified by the
Gravity Force
.
(Acceleration is applied by modifying the positionVelocity vector.)
If
Use Terminal Velocity?
is checked, the object will be prevented from going any faster than the
Terminal Velocity
value. Further, the events
Reached Terminal Velocity
and
Under Terminal Velocity
will fire as the object crosses between the two states.
The
Gravity Direction
vector does not need to be normalized, but does not affect the force of gravity.
This behavior can be used in conjunction with Collider for Simulations (and Collision Shell) to cause objects to bounce around in a semi-realistic manner.
Basic Properties
Gravity Force
Acceleration force in units/s^2
Start Immediately?
Start applying gravity immediately, or wait for the Start action to be called?
Advanced Properties
Gravity Direction
Direction for gravity to pull.
Use Terminal Velocity?
Should the object stop accelerating past a certain speed?
Terminal Velocity
Maximum speed for the object, in units/second.
Actions
Start
Start applying gravity.
Stop
Stop applying gravity.
Toggle
If gravity is on, turn it off; otherwise, turn it on.
Events
Started
Fires when gravity is turned on.
Stopped
Fires when gravity is turned off.
Reached Terminal Velocity
Fires if the object hits terminal velocity after having been slower than it.
Under Terminal Velocity
Fires if the object was at terminal velocity and slowed down.