- 最后登录
- 2024-6-3
- 注册时间
- 2009-10-16
- 阅读权限
- 100
- 积分
- 18803
- 纳金币
- 17488
- 精华
- 1
|
Grounded (Physics Behavior)
Summary
Forces the parent object to stay a set distance above ground/floor objects.
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 2.0.4 of the 'Grounded' behavior, current as of 2005-Feb-11)
Description
Attach this behavior to an object to cause it to stay at a set height above any objects which have the Collision Shell behavior attached.
The
Eye Height
property controls how far (in world units) above the ‘ground’ the pivot point of the object is placed.
By default, collision shells are checked for in the negative Y direction; this
Down Direction
can be changed under Advanced Properties.
To use this behavior with one which may alter the height (like the ‘Walk’ behavior), attach this behavior above others on the object. (This will cause the object to first ground itself to any applicable objects, and then the Walk behavior may offset its height from there.)
The object to which this behavior is attached should be left in ‘global space’; the parent object should not have any ancestors which have been transformed.
The
Use Gravity?
flag takes effect when the object being walked ‘falls’ off an edge
and
more ‘ground’ can be seen below. In this case, the object will start to fall (in the
Down Direction
) at a rate specified by
Gravity Force
. If
Use Gravity?
is not checked, the object will instantly be pulled down to the lower ground plane.
This behavior is typically used in a multi-level walkthrough presentation, along with Collider for Walkthroughs and either the Fly or Walk behaviors on a Camera.
Basic Properties
Eye Height
Distance above the 'ground' where the object should be kept.
Start Immediately?
Start sticking to the ground immediately, or wait for the Start action to be called?
Advanced Properties
Down Direction
Direction in which to check for the ground; defaults to down in the Y direction.
Down Distance
Distance from the object to check for any ground.
Use Gravity?
Fall off ledges according to gravity, or 'pop' to down?
Gravity Force
Acceleration force when falling (in units/second/second).
Actions
Start
Start keeping the parent object grounded.
Stop
Stop enforcing the grounding behavior.
Toggle
If the object is being grounded, stop it; otherwise, start grounding it.
Events
Started
Fires when grounding is turned on.
Stopped
Fires when grounding is turned off.
Demonstration
View Demonstration Project
Download Project File
|
|