Drag[en]gine Script Module DragonScript 1.35
Loading...
Searching...
No Matches
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.
Vector getDirection ()
 Test direction.
ECBehaviorBodyTilting getECBehavior ()
 Behavior.
bool getEnabled ()
 Enable body tilting.
ColliderCollisionTest geTestBackRight ()
 Tilt back right collision test.
ECBehaviorLocomotion.Instance getLocomotion ()
 Locomotion behavior.
ECBehaviorProjectToGround.Instance getProjectToGround ()
 Project to ground behavior.
ColliderCollisionTest getTestBackLeft ()
 Tilt back left collision test.
ColliderVolume getTestCollider ()
 Collier to attach collision tests to.
ColliderCollisionTest getTestFrontLeft ()
 Tilt front left collision test.
ColliderCollisionTest getTestFrontRight ()
 Tilt front right collision test.
void init (StubElement stub)
 Initialize element from stub.
Instance new (ECBehaviorBodyTilting ecbehavior, BehaviorElement element)
 Create element.
void setCollisionFilter (CollisionFilter filter)
 Set test collision filter.
void setDirection (float distance)
 Set test direction.
void setDirection (Vector distance)
 Set test direction.
void setEnabled (bool enabled)
 Set if body tilting is enabled.
void setOrigin (float right, float front, float up)
 Set test origins.
void setOrigin (Vector frontLeft, Vector frontRight, Vector backLeft, Vector backRight)
 Set test origins.
void setShape (ShapeList shape)
 Set shape of test collider.
Public Member Functions inherited from Dragengine.Scenery.DefaultECBehaviorInstance
void addToGameWorld ()
 Add element to game world.
void attachToParent (Element parent)
 Attach element to object set by the mapper in the IGDE World Editor.
void enterFrame ()
 Frame update started.
void geometryChanged ()
 Position or orientation changed.
BehaviorElement getElement ()
 Behavior element to apply behavior to.
int getInstanceIndex ()
 Behavior instance index.
DefaultECBehaviorInstance new (BehaviorElement element)
 Create default composeable instance.
void postThink (float elapsed)
 Post thinking after physics processing is finished.
void readFromFile (PersistencyEnvironment env, FileReader reader)
 Read behavior instance from file.
void removeFromGameWorld ()
 Remove element from game world.
bool requiresEnterFrame ()
 Behavior instance requires enterFrame() to be called.
bool requiresThink ()
 Behavior instance requires think() to be called.
void stateChanged ()
 State changed (visble, touchable).
void think (float elapsed)
 Think about what to do for the next frame update.
void writeToFile (PersistencyEnvironment env, FileWriter writer)
 Write behavior instance to file.

Additional Inherited Members

Public Attributes inherited from Dragengine.Scenery.DefaultECBehaviorInstance
BehaviorElement pElement
int pInstanceIndex
bool pRequiresEnterFrame
bool pRequiresThink
Protected Member Functions inherited from Dragengine.Scenery.DefaultECBehaviorInstance
void setRequiresEnterFrame (bool required)
 Set if behavior instance requires enterFrame() to be called.
void setRequiresThink (bool required)
 Set if behavior instance requires think() to be called.

Detailed Description

Behavior instance.

Member Function Documentation

◆ dispose()

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

Dispose of composeable instance.

Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.

Referenced by getEnabled(), and getLocomotion().

◆ getDirection()

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

Test direction.

References new().

◆ getECBehavior()

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

◆ getEnabled()

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

Enable body tilting.

References dispose().

Referenced by getTestFrontLeft().

◆ geTestBackRight()

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

Tilt back right collision test.

References setEnabled().

◆ getLocomotion()

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

Locomotion behavior.

References dispose().

Referenced by getECBehavior(), setEnabled(), setOrigin(), and setShape().

◆ getProjectToGround()

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

Project to ground behavior.

Referenced by getECBehavior(), and setOrigin().

◆ getTestBackLeft()

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

Tilt back left collision test.

References setEnabled().

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

References getEnabled().

◆ getTestFrontRight()

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

Tilt front right collision test.

References setEnabled().

◆ init()

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

Initialize element from stub.

Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.

References new().

Referenced by setEnabled().

◆ new()

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

◆ setCollisionFilter()

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

Set test collision filter.

References Dragengine.Scenery.ECBehaviorBodyTilting.getTestOrigin(), and new().

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

References new().

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

References new().

◆ setEnabled()

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

Set if body tilting is enabled.

References getLocomotion(), init(), and new().

Referenced by geTestBackRight(), getTestBackLeft(), and getTestFrontRight().

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

References getECBehavior(), and getLocomotion().

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

References getProjectToGround().

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

References Dragengine.Scenery.DefaultECBehaviorInstance.getElement(), and getLocomotion().


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