|
Drag[en]gine Script Module DragonScript 1.32.1
|
behavior adding body tilting support for actors projected to ground. More...
Classes | |
| class | Factory |
| Behavior factory. More... | |
| class | Instance |
| Behavior instance. More... | |
Public Member Functions | |
| ECBehaviorInstance | createInstance (BehaviorElement element) |
| Create Behavior instance. | |
| void | dispose () |
| Dispose of behavior. | |
| ECBehaviorLocomotion | getLocomotion () |
| Locomotion behavior. | |
| ECBehaviorProjectToGround | getProjectToGround () |
| Project to ground behavior. | |
| ECPFloat | getTestDirection () |
| Test direction. | |
| ECPVector | getTestOrigin () |
| Test origin. | |
| Instance | instance (BehaviorElement element) |
| Get instance in element from owner element class. | |
| ECBehaviorBodyTilting | new (BehaviorElementClass eclass, ECBehaviorLocomotion locomotion, ECBehaviorProjectToGround projectToGround) |
| Create behavior element class. | |
| ECBehaviorBodyTilting | new (BehaviorElementClass eclass, ECBehaviorLocomotion locomotion, ECBehaviorProjectToGround projectToGround, String prefix) |
Public Member Functions inherited from Dragengine.Scenery.DefaultECBehavior | |
| void | assignInstanceIndex (int instanceIndex) |
| Assign instance index. | |
| String | getBehaviorID () |
| Unique identifier of behavior. | |
| String | getID () |
| Identifier. | |
| int | getInstanceIndex () |
| Instance index. | |
| void | loadSupportedData (String identifier, PersistencyEnvironment env, FileReader reader, ECBehaviorInstance instance) |
| Load instance data of another behavior. | |
| bool | supportsBehaviorID (String identifier) |
| Behavior supports loading instance data of another behavior. | |
Static Public Member Functions | |
| static ECBehaviorBodyTilting | getBehaviorIn (BehaviorElementClass eclass) |
| Get behavior in element class or null if absent. | |
| static Instance | getInstanceIn (BehaviorElement element) |
| Get instance in element or null if absent. | |
Additional Inherited Members | |
Protected Member Functions inherited from Dragengine.Scenery.DefaultECBehavior | |
| DefaultECBehavior | new (BehaviorElementClass eclass) |
| Create default composeable behavior with empty identifier. | |
| DefaultECBehavior | new (BehaviorElementClass eclass, String id) |
| Create default composeable behavior. | |
| void | setBehaviorID (String identifier) |
| Set behavior identifier. | |
| void | useClassNameAsBehaviorID () |
| Set behavior identifier to "<class-name>:<identifier>". | |
| void | useFullyQualifiedClassNameAsBehaviorID () |
| Set behavior identifier to "<fully-qualified-class-name>:<identifier>". | |
behavior adding body tilting support for actors projected to ground.
Helps actors with appropriate animator setup to align their body to uneven ground underneath. This is done by using a set of collider collision tests to probe the terain. The result is handed over to a Locomotion insatance to calculate the tilting values. These values are then set to animator controlled linked to tilting values.
Behavior uses 4 collider collision tests located front-left, front-right, back-left and back-right.
Requires these behaviors to be present:
To this behavior add it and either set the class properties or call setShape(), setOrigin() and setDirection() to initialize. Then use Locomotion.addControllerMapping() with Locomotion.ATTR_TILT_OFFSET, Locomotion.ATTR_TILT_VERTICAL and Locomotion.ATTR_TILT_HORIZONTAL for animators supporting tilting.
| ECBehaviorInstance Dragengine.Scenery.ECBehaviorBodyTilting.createInstance | ( | BehaviorElement | element | ) |
Create Behavior instance.
Implements Dragengine.Scenery.ECBehavior.
| void Dragengine.Scenery.ECBehaviorBodyTilting.dispose | ( | ) |
Dispose of behavior.
Reimplemented from Dragengine.Scenery.DefaultECBehavior.
|
static |
Get behavior in element class or null if absent.
Use this method to check if a particular BehaviorElementClass contains a behavior of type ECBehaviorBodyTilting.
|
static |
Get instance in element or null if absent.
Use this method to check if a particular BehaviorElement contains a behavior instance of type ECBehaviorBodyTilting.Instance .
| ECBehaviorLocomotion Dragengine.Scenery.ECBehaviorBodyTilting.getLocomotion | ( | ) |
Locomotion behavior.
| ECBehaviorProjectToGround Dragengine.Scenery.ECBehaviorBodyTilting.getProjectToGround | ( | ) |
Project to ground behavior.
| ECPFloat Dragengine.Scenery.ECBehaviorBodyTilting.getTestDirection | ( | ) |
Test direction.
| ECPVector Dragengine.Scenery.ECBehaviorBodyTilting.getTestOrigin | ( | ) |
Test origin.
Used as Instance.setOrigin(x, z, y) hence right=x, front=z, up=y .
| Instance Dragengine.Scenery.ECBehaviorBodyTilting.instance | ( | BehaviorElement | element | ) |
Get instance in element from owner element class.
| ECBehaviorBodyTilting Dragengine.Scenery.ECBehaviorBodyTilting.new | ( | BehaviorElementClass | eclass, |
| ECBehaviorLocomotion | locomotion, | ||
| ECBehaviorProjectToGround | projectToGround | ||
| ) |
Create behavior element class.
| ECBehaviorBodyTilting Dragengine.Scenery.ECBehaviorBodyTilting.new | ( | BehaviorElementClass | eclass, |
| ECBehaviorLocomotion | locomotion, | ||
| ECBehaviorProjectToGround | projectToGround, | ||
| String | prefix | ||
| ) |