Drag[en]gine Script Module DragonScript  1.23
Dragengine.Scenery.ECBehaviorBodyTilting.Instance Class Reference

Behavior instance. More...

Inheritance diagram for Dragengine.Scenery.ECBehaviorBodyTilting.Instance:
Dragengine.Scenery.DefaultECBehaviorInstance Dragengine.Scenery.ECBehaviorInstance

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...
 

Detailed Description

Behavior instance.

Member Function Documentation

◆ dispose()

void Dragengine.Scenery.ECBehaviorBodyTilting.Instance.dispose ( )

Dispose of composeable instance.

Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.

◆ getDirection()

Vector Dragengine.Scenery.ECBehaviorBodyTilting.Instance.getDirection ( )

Test direction.

◆ getECBehavior()

ECBehaviorBodyTilting Dragengine.Scenery.ECBehaviorBodyTilting.Instance.getECBehavior ( )

Behavior.

◆ getEnabled()

bool Dragengine.Scenery.ECBehaviorBodyTilting.Instance.getEnabled ( )

Enable body tilting.

◆ geTestBackRight()

ColliderCollisionTest Dragengine.Scenery.ECBehaviorBodyTilting.Instance.geTestBackRight ( )

Tilt back right collision test.

◆ getLocomotion()

ECBehaviorLocomotion.Instance Dragengine.Scenery.ECBehaviorBodyTilting.Instance.getLocomotion ( )

Locomotion behavior.

◆ getProjectToGround()

ECBehaviorProjectToGround.Instance Dragengine.Scenery.ECBehaviorBodyTilting.Instance.getProjectToGround ( )

Project to ground behavior.

◆ getTestBackLeft()

ColliderCollisionTest Dragengine.Scenery.ECBehaviorBodyTilting.Instance.getTestBackLeft ( )

Tilt back left collision test.

◆ getTestCollider()

ColliderVolume Dragengine.Scenery.ECBehaviorBodyTilting.Instance.getTestCollider ( )

Collier to attach collision tests to.

◆ getTestFrontLeft()

ColliderCollisionTest Dragengine.Scenery.ECBehaviorBodyTilting.Instance.getTestFrontLeft ( )

Tilt front left collision test.

◆ getTestFrontRight()

ColliderCollisionTest Dragengine.Scenery.ECBehaviorBodyTilting.Instance.getTestFrontRight ( )

Tilt front right collision test.

◆ init()

void Dragengine.Scenery.ECBehaviorBodyTilting.Instance.init ( StubElement  stub)

Initialize element from stub.

Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.

◆ new()

Instance Dragengine.Scenery.ECBehaviorBodyTilting.Instance.new ( ECBehaviorBodyTilting  ecbehavior,
BehaviorElement  element 
)

Create element.

◆ setCollisionFilter()

void Dragengine.Scenery.ECBehaviorBodyTilting.Instance.setCollisionFilter ( CollisionFilter  filter)

Set test collision filter.

◆ setDirection() [1/2]

void Dragengine.Scenery.ECBehaviorBodyTilting.Instance.setDirection ( float  distance)

Set test direction.

Parameters
distanceDistance 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.

◆ setDirection() [2/2]

void Dragengine.Scenery.ECBehaviorBodyTilting.Instance.setDirection ( Vector  distance)

Set test direction.

Parameters
distanceDistance 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.

◆ setEnabled()

void Dragengine.Scenery.ECBehaviorBodyTilting.Instance.setEnabled ( bool  enabled)

Set if body tilting is enabled.

◆ setOrigin() [1/2]

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.

Parameters
rightOffset to the left and right. Typical value is 0.2m
frontOffset to the front and back. Typical value is 0.2m
upOffset upwards. Typical value is 0.2.

◆ setOrigin() [2/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.

Parameters
frontLeftOffset for the front-left test.
frontRightOffset for the front-right test.
backLeftOffeset for the back-left test.
backRightOffeset for the back-right test.

◆ setShape()

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).


The documentation for this class was generated from the following file: