Drag[en]gine Script Module DragonScript
1.23
|
Behavior instance. More...
Public Member Functions | |
void | dispose () |
Dispose of composeable instance. More... | |
Vector | getDirection () |
Test direction. More... | |
ECBehaviorBodyTilting | getECBehavior () |
Behavior. More... | |
bool | getEnabled () |
Enable body tilting. More... | |
ColliderCollisionTest | geTestBackRight () |
Tilt back right collision test. More... | |
ECBehaviorLocomotion.Instance | getLocomotion () |
Locomotion behavior. More... | |
ECBehaviorProjectToGround.Instance | getProjectToGround () |
Project to ground behavior. More... | |
ColliderCollisionTest | getTestBackLeft () |
Tilt back left collision test. More... | |
ColliderVolume | getTestCollider () |
Collier to attach collision tests to. More... | |
ColliderCollisionTest | getTestFrontLeft () |
Tilt front left collision test. More... | |
ColliderCollisionTest | getTestFrontRight () |
Tilt front right collision test. More... | |
void | init (StubElement stub) |
Initialize element from stub. More... | |
Instance | new (ECBehaviorBodyTilting ecbehavior, BehaviorElement element) |
Create element. More... | |
void | setCollisionFilter (CollisionFilter filter) |
Set test collision filter. More... | |
void | setDirection (float distance) |
Set test direction. More... | |
void | setDirection (Vector distance) |
Set test direction. More... | |
void | setEnabled (bool enabled) |
Set if body tilting is enabled. More... | |
void | setOrigin (float right, float front, float up) |
Set test origins. More... | |
void | setOrigin (Vector frontLeft, Vector frontRight, Vector backLeft, Vector backRight) |
Set test origins. More... | |
void | setShape (ShapeList shape) |
Set shape of test collider. More... | |
Public Member Functions inherited from Dragengine.Scenery.DefaultECBehaviorInstance | |
void | addToGameWorld () |
Add element to game world. More... | |
void | attachToParent (Element parent) |
Attach element to object set by the mapper in the IGDE World Editor. More... | |
void | enterFrame () |
Frame update started. More... | |
void | geometryChanged () |
Position or orientation changed. More... | |
BehaviorElement | getElement () |
Behavior element to apply behavior to. More... | |
int | getInstanceIndex () |
Behavior instance index. More... | |
DefaultECBehaviorInstance | new (BehaviorElement element) |
Create default composeable instance. More... | |
void | postThink (float elapsed) |
Post thinking after physics processing is finished. More... | |
void | readFromFile (PersistencyEnvironment env, FileReader reader) |
Read behavior instance from file. More... | |
void | removeFromGameWorld () |
Remove element from game world. More... | |
bool | requiresEnterFrame () |
Behavior instance requires enterFrame() to be called. More... | |
bool | requiresThink () |
Behavior instance requires think() to be called. More... | |
void | stateChanged () |
State changed (visble, touchable). More... | |
void | think (float elapsed) |
Think about what to do for the next frame update. More... | |
void | writeToFile (PersistencyEnvironment env, FileWriter writer) |
Write behavior instance to file. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from Dragengine.Scenery.DefaultECBehaviorInstance | |
void | setRequiresEnterFrame (bool required) |
Set if behavior instance requires enterFrame() to be called. More... | |
void | setRequiresThink (bool required) |
Set if behavior instance requires think() to be called. More... | |
Behavior instance.
void Dragengine.Scenery.ECBehaviorBodyTilting.Instance.dispose | ( | ) |
Dispose of composeable instance.
Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.
Vector Dragengine.Scenery.ECBehaviorBodyTilting.Instance.getDirection | ( | ) |
Test direction.
ECBehaviorBodyTilting Dragengine.Scenery.ECBehaviorBodyTilting.Instance.getECBehavior | ( | ) |
Behavior.
bool Dragengine.Scenery.ECBehaviorBodyTilting.Instance.getEnabled | ( | ) |
Enable body tilting.
ColliderCollisionTest Dragengine.Scenery.ECBehaviorBodyTilting.Instance.geTestBackRight | ( | ) |
Tilt back right collision test.
ECBehaviorLocomotion.Instance Dragengine.Scenery.ECBehaviorBodyTilting.Instance.getLocomotion | ( | ) |
Locomotion behavior.
ECBehaviorProjectToGround.Instance Dragengine.Scenery.ECBehaviorBodyTilting.Instance.getProjectToGround | ( | ) |
Project to ground behavior.
ColliderCollisionTest Dragengine.Scenery.ECBehaviorBodyTilting.Instance.getTestBackLeft | ( | ) |
Tilt back left collision test.
ColliderVolume Dragengine.Scenery.ECBehaviorBodyTilting.Instance.getTestCollider | ( | ) |
Collier to attach collision tests to.
ColliderCollisionTest Dragengine.Scenery.ECBehaviorBodyTilting.Instance.getTestFrontLeft | ( | ) |
Tilt front left collision test.
ColliderCollisionTest Dragengine.Scenery.ECBehaviorBodyTilting.Instance.getTestFrontRight | ( | ) |
Tilt front right collision test.
void Dragengine.Scenery.ECBehaviorBodyTilting.Instance.init | ( | StubElement | stub | ) |
Initialize element from stub.
Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.
Instance Dragengine.Scenery.ECBehaviorBodyTilting.Instance.new | ( | ECBehaviorBodyTilting | ecbehavior, |
BehaviorElement | element | ||
) |
Create element.
void Dragengine.Scenery.ECBehaviorBodyTilting.Instance.setCollisionFilter | ( | CollisionFilter | filter | ) |
Set test collision filter.
void Dragengine.Scenery.ECBehaviorBodyTilting.Instance.setDirection | ( | float | distance | ) |
Set test direction.
distance | Distance to test along. This is the furthest distance the actor can be projected down to. Typical value is -0.3 to project the actor down by at most 0.3 meters. |
void Dragengine.Scenery.ECBehaviorBodyTilting.Instance.setDirection | ( | Vector | distance | ) |
Set test direction.
distance | Distance to test along. This is the furthest distance the actor can be projected down to. Typical value is (0, -0.3, 0) to project the actor down by at most 0.3 meters. |
void Dragengine.Scenery.ECBehaviorBodyTilting.Instance.setEnabled | ( | bool | enabled | ) |
Set if body tilting is enabled.
void Dragengine.Scenery.ECBehaviorBodyTilting.Instance.setOrigin | ( | float | right, |
float | front, | ||
float | up | ||
) |
Set test origins.
Tests are distributed front-left, front-right, back-left and back-right.
right | Offset to the left and right. Typical value is 0.2m |
front | Offset to the front and back. Typical value is 0.2m |
up | Offset upwards. Typical value is 0.2. |
void Dragengine.Scenery.ECBehaviorBodyTilting.Instance.setOrigin | ( | Vector | frontLeft, |
Vector | frontRight, | ||
Vector | backLeft, | ||
Vector | backRight | ||
) |
Set test origins.
Tests are distributed front-left, front-right, back-left and back-right.
frontLeft | Offset for the front-left test. |
frontRight | Offset for the front-right test. |
backLeft | Offeset for the back-left test. |
backRight | Offeset for the back-right test. |
void Dragengine.Scenery.ECBehaviorBodyTilting.Instance.setShape | ( | ShapeList | shape | ) |
Set shape of test collider.
For best results a shape should be used which is slightly smaller than the shape of the collider used to move an element through the game world. If the shape used for the test collider is equal or larger strange behavior can be the result (for example climbing).
Recommended is setting a ShapeList with a box at (0, 0.05, 0), no orientation and half-extends (0.05, 0.05, 0.05).