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

Locomotion. More...

Inheritance diagram for Dragengine.Scenery.Locomotion:

Public Member Functions

Constructors
Locomotion new ()
 Create locomotion. More...
 
Basic Parameters
bool getCanTurn ()
 Determine if the actor can turn. More...
 
void setCanTurn (bool canTurn)
 Set if the actor can turn. More...
 
Looking around
float getLimitLookUp ()
 Looking up limit angle in degrees. More...
 
void setLimitLookUp (float limit)
 Set looking up limit angle in degrees. More...
 
float getLimitLookDown ()
 Looking down limit angle in degrees. More...
 
void setLimitLookDown (float limit)
 Set looking down limit angle in degrees. More...
 
float getAdjustTimeVertical ()
 Look up-down adjustment time in seconds. More...
 
void setAdjustTimeVertical (float time)
 Set look up-down adjustment time in seconds. More...
 
float getAdjustRangeVertical ()
 Look up-down adjustment range. More...
 
void setAdjustRangeVertical (float range)
 Set look up-down adjustment range. More...
 
float getLookVerticalGoal ()
 Looking up-down goal. More...
 
void setLookVerticalGoal (float goal)
 Set looking up-down goal. More...
 
float getLookVertical ()
 Looking up-down value. More...
 
void setLookVertical (float value)
 Looking up-down value. More...
 
float getLimitLookLeft ()
 Looking left limit in degrees. More...
 
void setLimitLookLeft (float limit)
 Set looking left limit in degrees. More...
 
float getLimitLookRight ()
 Looking right limit in degrees. More...
 
void setLimitLookRight (float limit)
 Set looking right limit in degrees. More...
 
float getAdjustTimeHorizontal ()
 Look left-right adjustment time in seconds. More...
 
void setAdjustTimeHorizontal (float time)
 Set look left-right adjustment time in seconds. More...
 
float getAdjustRangeHorizontal ()
 Look left-right adjustment range. More...
 
void setAdjustRangeHorizontal (float range)
 Set look left-right adjustment range. More...
 
float getLookHorizontalGoal ()
 Look left-right goal. More...
 
void setLookHorizontalGoal (float goal)
 Set look left-right goal. More...
 
float getLookHorizontal ()
 Look left-right value. More...
 
void setLookHorizontal (float value)
 Set look left-right value. More...
 
bool getTurnAdjustLookHorizontal ()
 Adjust looking left-right while turning. More...
 
void setTurnAdjustLookHorizontal (bool turnAdjust)
 Set if looking left-right is adjusted while turning. More...
 
float getAnalogMovingVertical ()
 Analog looking up-down. More...
 
void setAnalogMovingVertical (float value)
 Set analog looking up-down. More...
 
Turning
float getTurnHorizontal ()
 Turn left-right value. More...
 
void setTurnHorizontal (float value)
 Set turn left-right value. More...
 
float getAdjustTimeOrientation ()
 Orientation adjustment time in seconds. More...
 
void setAdjustTimeOrientation (float time)
 Set orientation adjustment time in seconds. More...
 
float getOrientation ()
 Actor orientation in world space. More...
 
void setOrientation (float orientation)
 Set actor orientation in world space. More...
 
Quaternion getOrientationQuaternion ()
 Actor orientation as quaternion. More...
 
void setOrientationQuaternion (Quaternion orientation)
 Set actor orientation as quaternion. More...
 
float getTurningSpeed ()
 Turning speed in meters per second. More...
 
void setTurningSpeed (float speed)
 Set turning speed in meters per second. More...
 
Vector getAngularVelocity ()
 Angular velocity of the actor turning. More...
 
void setAngularVelocity (Vector velocity)
 Set angular velocity of the actor turning. More...
 
bool getIsTurningIP ()
 Determine if the actor is turning in place. More...
 
void setIsTurningIP (bool turnInPlace)
 Set if the actor is turning in place. More...
 
float getAdjustTimeTurnIP ()
 Adjustment time in seconds for turning in-place. More...
 
void setAdjustTimeTurnIP (float time)
 Set adjustment time in seconds for turning in-place. More...
 
float getTurnIP ()
 Turn in place value. More...
 
void setTurnIP (float value)
 Set turn in place value. More...
 
bool getResetTimeTurnIP ()
 Determine if the turn in place time linked controllers have to be reset. More...
 
void setResetTimeTurnIP (bool reset)
 Set if the turn in place time linked controllers have to be reset. More...
 
bool getReverseTimeTurnIP ()
 Determine if the turn in place time linked controllers have to be reversed. More...
 
void setReverseTimeTurnIP (bool reverse)
 Set if the turn in place time linked controllers have to be reversed. More...
 
bool getCanTurnInPlace ()
 Actor can turn in-place if looking beyond limits. More...
 
void setCanTurnInPlace (bool canTurnInPlace)
 Set if actor can turn in-place if looking beyond limits. More...
 
float getLimitTurnInPlaceLeft ()
 Looking left limit in degrees before turning in-place. More...
 
void setLimitTurnInPlaceLeft (float limit)
 Set looking left limit in degrees before turning in-place. More...
 
float getLimitTurnInPlaceRight ()
 Looking right limit in degrees before turning in-place. More...
 
void setLimitTurnInPlaceRight (float limit)
 Set looking right limit in degrees before turning in-place. More...
 
Movement
float getAdjustTimeAnalogMovingHorizontal ()
 Analog looking left-right adjustment time in seconds. More...
 
void setAdjustTimeAnalogMovingHorizontal (float time)
 Set analog looking left-right adjustment time in seconds. More...
 
float getAdjustRangeAnalogMovingHorizontal ()
 Analog looking left-right adjustment range. More...
 
void setAdjustRangeAnalogMovingHorizontal (float range)
 Set analog looking left-right adjustment range. More...
 
float getAnalogMovingHorizontalGoal ()
 Analog looking left-right goal. More...
 
void setAnalogMovingHorizontalGoal (float value)
 Set analog looking left-right goal. More...
 
float getAnalogMovingHorizontal ()
 Analog looking left-right. More...
 
void setAnalogMovingHorizontal (float value)
 Set analog looking left-right. More...
 
float getAnalogMovingSpeed ()
 Analog moving speed. More...
 
void setAnalogMovingSpeed (float value)
 Set analog moving speed. More...
 
bool getIsMoving ()
 Determine if the actor is moving direct or analog. More...
 
void setIsMoving (bool isMoving)
 Set determine if the actor is moving direct or analog. More...
 
float getMovingSpeed ()
 Relative movement speed. More...
 
float getAbsMovingSpeed ()
 Absolute movement speed. More...
 
void setMovingSpeed (float speed)
 Set movement speed. More...
 
Vector getLinearVelocity ()
 Linear velocity. More...
 
void setLinearVelocity (Vector velocity)
 Set linear velocity. More...
 
float getAdjustTimeLinearVelocity ()
 Linear velocity adjustment time in seconds. More...
 
void setAdjustTimeLinearVelocity (float time)
 Set linear velocity adjustment time in seconds. More...
 
float getAdjustRangeLinearVelocity ()
 Linear velocity adjustment range in meters per second. More...
 
void setAdjustRangeLinearVelocity (float range)
 Set linear velocity adjustment range in meters per second. More...
 
float getMovingOrientation ()
 Movement orientation in world space. More...
 
void setMovingOrientation (float orientation)
 Set movement orientation in world space. More...
 
float getMovingDirection ()
 Movement direction relative to view orientation. More...
 
Vector getMovingDirectionVector ()
 Movement direction vector relative to view orientation. More...
 
void setMovingDirection (float direction)
 Set movement direction relative to view orientation. More...
 
bool getResetTimeWalk ()
 Determine if the walk/run time linked controllers have to be reset. More...
 
void setResetTimeWalk (bool reset)
 Set if the walk/run time linked controllers have to be reset. More...
 
Stance
float getAdjustTimeStance ()
 Adjustment time for stance in seconds. More...
 
void setAdjustTimeStance (float time)
 Adjustment time for stance in seconds. More...
 
float getAdjustRangeStance ()
 Adjustment range for stance. More...
 
void setAdjustRangeStance (float time)
 Adjustment range for stance. More...
 
float getStance ()
 Stance value. More...
 
void setStance (float stance)
 Set stance value. More...
 
float getStanceGoal ()
 Stance goal value. More...
 
void setStanceGoal (float stance)
 Set stance goal value. More...
 
Body tilting
bool getCanTilt ()
 Determine if the actor can tilt the body. More...
 
void setCanTilt (bool canTilt)
 Set if the actor can tilt the body. More...
 
LocomotionTilt getTiltMode ()
 Tilt mode. More...
 
void setTiltMode (LocomotionTilt mode)
 Set tilt mode. More...
 
void setCCTTiltSingle (ColliderCollisionTest collisionTest)
 Set single collider collision test for tilt calculation or null if not set. More...
 
void setCCTTiltFrontLeft (ColliderCollisionTest collisionTest)
 Set front left collider collision test for tilt calculation or null if not set. More...
 
void setCCTTiltFrontRight (ColliderCollisionTest collisionTest)
 Set front right collider collision test for tilt calculation or null if not set. More...
 
void setCCTTiltBackLeft (ColliderCollisionTest collisionTest)
 Set back left collider collision test for tilt calculation or null if not set. More...
 
void setCCTTiltBackRight (ColliderCollisionTest collisionTest)
 Set back right collider collision test for tilt calculation or NULL if not set. More...
 
float getLimitTiltUp ()
 Tilt up limit in degrees. More...
 
void setLimitTiltUp (float limit)
 Set tilt up limit in degrees. More...
 
float getLimitTiltDown ()
 Tilt down limit in degrees. More...
 
void setLimitTiltDown (float limit)
 Set tilt down limit in degrees. More...
 
float getTiltVertical ()
 Current tilt up/down angle in degrees. More...
 
void setTiltVertical (float tiltVertical)
 Set current tilt up/down angle in degrees. More...
 
float getTiltVerticalGoal ()
 Goal tilt up/down angle in degrees. More...
 
void setTiltVerticalGoal (float tiltVertical)
 Set goal tilt up/down angle in degrees. More...
 
float getAdjustTimeTiltVertical ()
 Tilt up/down adjust time in seconds. More...
 
void setAdjustTimeTiltVertical (float tiltVertical)
 Set tilt up/down afjust time in seconds. More...
 
float getAdjustRangeTiltVertical ()
 Tilt up/down adjust range. More...
 
void setAdjustRangeTiltVertical (float tiltVertical)
 Set tilt up/down afjust range. More...
 
float getLimitTiltLeft ()
 Tilt left limit in degrees. More...
 
void setLimitTiltLeft (float limit)
 Set tilt left limit in degrees. More...
 
float getLimitTiltRight ()
 Tilt right limit in degrees. More...
 
void setLimitTiltRight (float limit)
 Set Tilt right limit in degrees. More...
 
float getTiltHorizontal ()
 Current tilt left/right angle in degrees. More...
 
void setTiltHorizontal (float tiltHorizontal)
 Set current tilt left/right angle in degrees. More...
 
float getTiltHorizontalGoal ()
 Goal tilt left/right angle in degrees. More...
 
void setTiltHorizontalGoal (float tiltHorizontal)
 Set goal tilt left/right angle in degrees. More...
 
float getAdjustTimeTiltHorizontal ()
 Tilt left/right adjust time in seconds. More...
 
void setAdjustTimeTiltHorizontal (float tiltHorizontal)
 Set tilt left/right afjust time in seconds. More...
 
float getAdjustRangeTiltHorizontal ()
 Tilt left/right adjust range. More...
 
void setAdjustRangeTiltHorizontal (float tiltHorizontal)
 Set tilt left/right afjust range. More...
 
float getTiltOffset ()
 Tilt offset in meters. More...
 
void setTiltOffset (float offset)
 Set tilt offset in meters. More...
 
State control and frame update
void cancelInput ()
 Cancel input. More...
 
void cancelMovement ()
 Cancel Movement. More...
 
void cancelMotion ()
 Cancel motion. More...
 
void cancelTurnInPlace ()
 Cancel turning in-place. More...
 
void forceBodyAdjustment ()
 Force body adjustment. More...
 
void updateLooking (float elapsed)
 Update looking. More...
 
void applyStates ()
 Apply states without interpolation or smoothing. More...
 
void updateLocomotion (float elapsed)
 Update locomotion. More...
 
void updateIsMoving ()
 Update is moving. More...
 
void updateOrientation (float elapsed)
 Update orientation. More...
 
void updateLinearVelocity (float elapsed)
 Update linear velocity. More...
 
void updateMovementDirection (float elapsed)
 Update moving direction for FPS locomotion. More...
 
void updateStance (float elapsed)
 Update stance. More...
 
void updatePostLocomotion (float elapsed)
 Update locomotion after physics calculations. More...
 
void updateTilt (float elapsed)
 Update body tilting. More...
 
void updateAnimatorInstance (float elapsed)
 Update animator instance controllers if set with locomotion parameters. More...
 
void updateAICollider ()
 Update AI collider linear and angular velocity. More...
 
void adjustOrientation (float angle)
 Adjust orientation. More...
 
Animator and collider control
void addControllerMapping (AnimatorController controller, LocomotionAttribute attribute)
 Add or change controller mapping. More...
 
void removeControllerMapping (AnimatorController controller)
 Remove controller mapping if present. More...
 
void removeAllControllerMappings ()
 Remove all controller mappings. More...
 
Collider getAICollider ()
 AI collider to update or NULL if not used. More...
 
void setAICollider (Collider collider)
 Set AI collider to update or NULL if not used. More...
 
Collider getUpdateAIColliderAngularVelocity ()
 Determine if the angular velocity of the AI collider is updated. More...
 
void setUpdateAIColliderAngularVelocity (bool updateAngularVelocity)
 Set if the angular velocity of the AI collider is updated. More...
 
File Handling
void readFromFile (FileReader reader)
 Read locomotion state from file reader. More...
 
void writeToFile (FileWriter writer)
 Write locomotion state to file writer. More...
 

Detailed Description

Locomotion.

Native class implementation of typical actor locomotion. Provides support to track locomotion state of various kinds of actors and optionally updating AnimatorInstance and Collider automatically. The native locomotion implementation has better performance than implementing the same functionality in pure scripts. You can subclass to add your game specific locomotion needs. Do not overload methods from "State control and frame update" if possible. Some of them are used internally by other calls. For performance reasons they do not use late binding calls. Your overloaded methods would only work if called from game scripts directly.

This locomotion implementation provides the following functionality out of the box:

  • Locomotion handling for natural, fps and vehicle type actors
  • Looking up/down and left/right using digital and analog input with smoothing
  • Turning using digital and analog input with smoothign for vehicle type locomotion
  • Forced actor orientation adjusting if looking too far left/right
  • Walk and running movement using digital and analog input with smoothing
  • Uprect and crouching stance using digital input with smoothing
  • Moving direction (strafing) using digital and analog input with smoothing
  • Body tilting calculation to fit actor to ground
  • Automatically updating AnimatorInstance mapping attributes to controllers
  • Automatically updating AI Collider velocities

This is a native class.

Member Function Documentation

◆ addControllerMapping()

void Dragengine.Scenery.Locomotion.addControllerMapping ( AnimatorController  controller,
LocomotionAttribute  attribute 
)

Add or change controller mapping.

◆ adjustOrientation()

void Dragengine.Scenery.Locomotion.adjustOrientation ( float  angle)

Adjust orientation.

Version
1.18

Adjusts various orientation parameters to rotate by a given angle ensuring all relationships between the various parameters are still correct. Use this method if you want to manually rotate an actor while keeping the looking and movement direction intact. In particular this method adjust the following parameters without taking limitations into account:

  • Orientation
  • Look horizontal
  • Look horizontal goal
  • Analog move horizontal
  • Turn horizontal

◆ applyStates()

void Dragengine.Scenery.Locomotion.applyStates ( )

Apply states without interpolation or smoothing.

◆ cancelInput()

void Dragengine.Scenery.Locomotion.cancelInput ( )

Cancel input.

Resets these parameters:

  • Analog moving left-right: set value and goal to 0
  • Analog moving speed: set to 0
  • Turn left right: set to 0
  • Look left-right: set goal to value
  • Look up-down: set goal to value
  • Stance: set goal to value

◆ cancelMotion()

void Dragengine.Scenery.Locomotion.cancelMotion ( )

Cancel motion.

Includes cancelInput(), cancelMovement() and cancelTurnInPlace().

Resets these parameters:

  • Turning speed: set to 0
  • Turn in-place: set to 0
  • Tilt left-right: set goal to value
  • Tilt up-down: set goal to value

◆ cancelMovement()

void Dragengine.Scenery.Locomotion.cancelMovement ( )

Cancel Movement.

Includes cancelInput().

Resets these parameters:

  • Linear velocity: set goal and value to 0
  • Moving speed: set to 0
  • Moving orientation: set to 0
  • Moving direction: set to 0

◆ cancelTurnInPlace()

void Dragengine.Scenery.Locomotion.cancelTurnInPlace ( )

Cancel turning in-place.

Resets these parameters:

  • Turn in-place: set to 0
  • Is Turning: set to false

◆ forceBodyAdjustment()

void Dragengine.Scenery.Locomotion.forceBodyAdjustment ( )

Force body adjustment.

◆ getAbsMovingSpeed()

float Dragengine.Scenery.Locomotion.getAbsMovingSpeed ( )

Absolute movement speed.

Absolute value of getMovingSpeed() no matter if moving forward or backward.

◆ getAdjustRangeAnalogMovingHorizontal()

float Dragengine.Scenery.Locomotion.getAdjustRangeAnalogMovingHorizontal ( )

Analog looking left-right adjustment range.

◆ getAdjustRangeHorizontal()

float Dragengine.Scenery.Locomotion.getAdjustRangeHorizontal ( )

Look left-right adjustment range.

◆ getAdjustRangeLinearVelocity()

float Dragengine.Scenery.Locomotion.getAdjustRangeLinearVelocity ( )

Linear velocity adjustment range in meters per second.

◆ getAdjustRangeStance()

float Dragengine.Scenery.Locomotion.getAdjustRangeStance ( )

Adjustment range for stance.

◆ getAdjustRangeTiltHorizontal()

float Dragengine.Scenery.Locomotion.getAdjustRangeTiltHorizontal ( )

Tilt left/right adjust range.

◆ getAdjustRangeTiltVertical()

float Dragengine.Scenery.Locomotion.getAdjustRangeTiltVertical ( )

Tilt up/down adjust range.

◆ getAdjustRangeVertical()

float Dragengine.Scenery.Locomotion.getAdjustRangeVertical ( )

Look up-down adjustment range.

◆ getAdjustTimeAnalogMovingHorizontal()

float Dragengine.Scenery.Locomotion.getAdjustTimeAnalogMovingHorizontal ( )

Analog looking left-right adjustment time in seconds.

◆ getAdjustTimeHorizontal()

float Dragengine.Scenery.Locomotion.getAdjustTimeHorizontal ( )

Look left-right adjustment time in seconds.

◆ getAdjustTimeLinearVelocity()

float Dragengine.Scenery.Locomotion.getAdjustTimeLinearVelocity ( )

Linear velocity adjustment time in seconds.

◆ getAdjustTimeOrientation()

float Dragengine.Scenery.Locomotion.getAdjustTimeOrientation ( )

Orientation adjustment time in seconds.

◆ getAdjustTimeStance()

float Dragengine.Scenery.Locomotion.getAdjustTimeStance ( )

Adjustment time for stance in seconds.

◆ getAdjustTimeTiltHorizontal()

float Dragengine.Scenery.Locomotion.getAdjustTimeTiltHorizontal ( )

Tilt left/right adjust time in seconds.

◆ getAdjustTimeTiltVertical()

float Dragengine.Scenery.Locomotion.getAdjustTimeTiltVertical ( )

Tilt up/down adjust time in seconds.

◆ getAdjustTimeTurnIP()

float Dragengine.Scenery.Locomotion.getAdjustTimeTurnIP ( )

Adjustment time in seconds for turning in-place.

◆ getAdjustTimeVertical()

float Dragengine.Scenery.Locomotion.getAdjustTimeVertical ( )

Look up-down adjustment time in seconds.

◆ getAICollider()

Collider Dragengine.Scenery.Locomotion.getAICollider ( )

AI collider to update or NULL if not used.

◆ getAnalogMovingHorizontal()

float Dragengine.Scenery.Locomotion.getAnalogMovingHorizontal ( )

Analog looking left-right.

◆ getAnalogMovingHorizontalGoal()

float Dragengine.Scenery.Locomotion.getAnalogMovingHorizontalGoal ( )

Analog looking left-right goal.

◆ getAnalogMovingSpeed()

float Dragengine.Scenery.Locomotion.getAnalogMovingSpeed ( )

Analog moving speed.

◆ getAnalogMovingVertical()

float Dragengine.Scenery.Locomotion.getAnalogMovingVertical ( )

Analog looking up-down.

◆ getAngularVelocity()

Vector Dragengine.Scenery.Locomotion.getAngularVelocity ( )

Angular velocity of the actor turning.

◆ getCanTilt()

bool Dragengine.Scenery.Locomotion.getCanTilt ( )

Determine if the actor can tilt the body.

◆ getCanTurn()

bool Dragengine.Scenery.Locomotion.getCanTurn ( )

Determine if the actor can turn.

◆ getCanTurnInPlace()

bool Dragengine.Scenery.Locomotion.getCanTurnInPlace ( )

Actor can turn in-place if looking beyond limits.

◆ getIsMoving()

bool Dragengine.Scenery.Locomotion.getIsMoving ( )

Determine if the actor is moving direct or analog.

◆ getIsTurningIP()

bool Dragengine.Scenery.Locomotion.getIsTurningIP ( )

Determine if the actor is turning in place.

◆ getLimitLookDown()

float Dragengine.Scenery.Locomotion.getLimitLookDown ( )

Looking down limit angle in degrees.

◆ getLimitLookLeft()

float Dragengine.Scenery.Locomotion.getLimitLookLeft ( )

Looking left limit in degrees.

◆ getLimitLookRight()

float Dragengine.Scenery.Locomotion.getLimitLookRight ( )

Looking right limit in degrees.

◆ getLimitLookUp()

float Dragengine.Scenery.Locomotion.getLimitLookUp ( )

Looking up limit angle in degrees.

◆ getLimitTiltDown()

float Dragengine.Scenery.Locomotion.getLimitTiltDown ( )

Tilt down limit in degrees.

◆ getLimitTiltLeft()

float Dragengine.Scenery.Locomotion.getLimitTiltLeft ( )

Tilt left limit in degrees.

◆ getLimitTiltRight()

float Dragengine.Scenery.Locomotion.getLimitTiltRight ( )

Tilt right limit in degrees.

◆ getLimitTiltUp()

float Dragengine.Scenery.Locomotion.getLimitTiltUp ( )

Tilt up limit in degrees.

◆ getLimitTurnInPlaceLeft()

float Dragengine.Scenery.Locomotion.getLimitTurnInPlaceLeft ( )

Looking left limit in degrees before turning in-place.

◆ getLimitTurnInPlaceRight()

float Dragengine.Scenery.Locomotion.getLimitTurnInPlaceRight ( )

Looking right limit in degrees before turning in-place.

◆ getLinearVelocity()

Vector Dragengine.Scenery.Locomotion.getLinearVelocity ( )

Linear velocity.

◆ getLookHorizontal()

float Dragengine.Scenery.Locomotion.getLookHorizontal ( )

Look left-right value.

◆ getLookHorizontalGoal()

float Dragengine.Scenery.Locomotion.getLookHorizontalGoal ( )

Look left-right goal.

◆ getLookVertical()

float Dragengine.Scenery.Locomotion.getLookVertical ( )

Looking up-down value.

◆ getLookVerticalGoal()

float Dragengine.Scenery.Locomotion.getLookVerticalGoal ( )

Looking up-down goal.

◆ getMovingDirection()

float Dragengine.Scenery.Locomotion.getMovingDirection ( )

Movement direction relative to view orientation.

◆ getMovingDirectionVector()

Vector Dragengine.Scenery.Locomotion.getMovingDirectionVector ( )

Movement direction vector relative to view orientation.

◆ getMovingOrientation()

float Dragengine.Scenery.Locomotion.getMovingOrientation ( )

Movement orientation in world space.

◆ getMovingSpeed()

float Dragengine.Scenery.Locomotion.getMovingSpeed ( )

Relative movement speed.

Speed is positive for moving forward and negative for moving backward.

◆ getOrientation()

float Dragengine.Scenery.Locomotion.getOrientation ( )

Actor orientation in world space.

◆ getOrientationQuaternion()

Quaternion Dragengine.Scenery.Locomotion.getOrientationQuaternion ( )

Actor orientation as quaternion.

◆ getResetTimeTurnIP()

bool Dragengine.Scenery.Locomotion.getResetTimeTurnIP ( )

Determine if the turn in place time linked controllers have to be reset.

◆ getResetTimeWalk()

bool Dragengine.Scenery.Locomotion.getResetTimeWalk ( )

Determine if the walk/run time linked controllers have to be reset.

◆ getReverseTimeTurnIP()

bool Dragengine.Scenery.Locomotion.getReverseTimeTurnIP ( )

Determine if the turn in place time linked controllers have to be reversed.

◆ getStance()

float Dragengine.Scenery.Locomotion.getStance ( )

Stance value.

◆ getStanceGoal()

float Dragengine.Scenery.Locomotion.getStanceGoal ( )

Stance goal value.

◆ getTiltHorizontal()

float Dragengine.Scenery.Locomotion.getTiltHorizontal ( )

Current tilt left/right angle in degrees.

◆ getTiltHorizontalGoal()

float Dragengine.Scenery.Locomotion.getTiltHorizontalGoal ( )

Goal tilt left/right angle in degrees.

◆ getTiltMode()

LocomotionTilt Dragengine.Scenery.Locomotion.getTiltMode ( )

Tilt mode.

◆ getTiltOffset()

float Dragengine.Scenery.Locomotion.getTiltOffset ( )

Tilt offset in meters.

◆ getTiltVertical()

float Dragengine.Scenery.Locomotion.getTiltVertical ( )

Current tilt up/down angle in degrees.

◆ getTiltVerticalGoal()

float Dragengine.Scenery.Locomotion.getTiltVerticalGoal ( )

Goal tilt up/down angle in degrees.

◆ getTurnAdjustLookHorizontal()

bool Dragengine.Scenery.Locomotion.getTurnAdjustLookHorizontal ( )

Adjust looking left-right while turning.

◆ getTurnHorizontal()

float Dragengine.Scenery.Locomotion.getTurnHorizontal ( )

Turn left-right value.

◆ getTurningSpeed()

float Dragengine.Scenery.Locomotion.getTurningSpeed ( )

Turning speed in meters per second.

◆ getTurnIP()

float Dragengine.Scenery.Locomotion.getTurnIP ( )

Turn in place value.

◆ getUpdateAIColliderAngularVelocity()

Collider Dragengine.Scenery.Locomotion.getUpdateAIColliderAngularVelocity ( )

Determine if the angular velocity of the AI collider is updated.

◆ new()

Locomotion Dragengine.Scenery.Locomotion.new ( )

Create locomotion.

◆ readFromFile()

void Dragengine.Scenery.Locomotion.readFromFile ( FileReader  reader)

Read locomotion state from file reader.

Restores all parameters except:

  • Controller Mappings
  • Assigned AI Collider

◆ removeAllControllerMappings()

void Dragengine.Scenery.Locomotion.removeAllControllerMappings ( )

Remove all controller mappings.

◆ removeControllerMapping()

void Dragengine.Scenery.Locomotion.removeControllerMapping ( AnimatorController  controller)

Remove controller mapping if present.

◆ setAdjustRangeAnalogMovingHorizontal()

void Dragengine.Scenery.Locomotion.setAdjustRangeAnalogMovingHorizontal ( float  range)

Set analog looking left-right adjustment range.

◆ setAdjustRangeHorizontal()

void Dragengine.Scenery.Locomotion.setAdjustRangeHorizontal ( float  range)

Set look left-right adjustment range.

◆ setAdjustRangeLinearVelocity()

void Dragengine.Scenery.Locomotion.setAdjustRangeLinearVelocity ( float  range)

Set linear velocity adjustment range in meters per second.

◆ setAdjustRangeStance()

void Dragengine.Scenery.Locomotion.setAdjustRangeStance ( float  time)

Adjustment range for stance.

◆ setAdjustRangeTiltHorizontal()

void Dragengine.Scenery.Locomotion.setAdjustRangeTiltHorizontal ( float  tiltHorizontal)

Set tilt left/right afjust range.

◆ setAdjustRangeTiltVertical()

void Dragengine.Scenery.Locomotion.setAdjustRangeTiltVertical ( float  tiltVertical)

Set tilt up/down afjust range.

◆ setAdjustRangeVertical()

void Dragengine.Scenery.Locomotion.setAdjustRangeVertical ( float  range)

Set look up-down adjustment range.

◆ setAdjustTimeAnalogMovingHorizontal()

void Dragengine.Scenery.Locomotion.setAdjustTimeAnalogMovingHorizontal ( float  time)

Set analog looking left-right adjustment time in seconds.

◆ setAdjustTimeHorizontal()

void Dragengine.Scenery.Locomotion.setAdjustTimeHorizontal ( float  time)

Set look left-right adjustment time in seconds.

◆ setAdjustTimeLinearVelocity()

void Dragengine.Scenery.Locomotion.setAdjustTimeLinearVelocity ( float  time)

Set linear velocity adjustment time in seconds.

◆ setAdjustTimeOrientation()

void Dragengine.Scenery.Locomotion.setAdjustTimeOrientation ( float  time)

Set orientation adjustment time in seconds.

◆ setAdjustTimeStance()

void Dragengine.Scenery.Locomotion.setAdjustTimeStance ( float  time)

Adjustment time for stance in seconds.

◆ setAdjustTimeTiltHorizontal()

void Dragengine.Scenery.Locomotion.setAdjustTimeTiltHorizontal ( float  tiltHorizontal)

Set tilt left/right afjust time in seconds.

◆ setAdjustTimeTiltVertical()

void Dragengine.Scenery.Locomotion.setAdjustTimeTiltVertical ( float  tiltVertical)

Set tilt up/down afjust time in seconds.

◆ setAdjustTimeTurnIP()

void Dragengine.Scenery.Locomotion.setAdjustTimeTurnIP ( float  time)

Set adjustment time in seconds for turning in-place.

◆ setAdjustTimeVertical()

void Dragengine.Scenery.Locomotion.setAdjustTimeVertical ( float  time)

Set look up-down adjustment time in seconds.

◆ setAICollider()

void Dragengine.Scenery.Locomotion.setAICollider ( Collider  collider)

Set AI collider to update or NULL if not used.

◆ setAnalogMovingHorizontal()

void Dragengine.Scenery.Locomotion.setAnalogMovingHorizontal ( float  value)

Set analog looking left-right.

◆ setAnalogMovingHorizontalGoal()

void Dragengine.Scenery.Locomotion.setAnalogMovingHorizontalGoal ( float  value)

Set analog looking left-right goal.

◆ setAnalogMovingSpeed()

void Dragengine.Scenery.Locomotion.setAnalogMovingSpeed ( float  value)

Set analog moving speed.

◆ setAnalogMovingVertical()

void Dragengine.Scenery.Locomotion.setAnalogMovingVertical ( float  value)

Set analog looking up-down.

◆ setAngularVelocity()

void Dragengine.Scenery.Locomotion.setAngularVelocity ( Vector  velocity)

Set angular velocity of the actor turning.

◆ setCanTilt()

void Dragengine.Scenery.Locomotion.setCanTilt ( bool  canTilt)

Set if the actor can tilt the body.

◆ setCanTurn()

void Dragengine.Scenery.Locomotion.setCanTurn ( bool  canTurn)

Set if the actor can turn.

◆ setCanTurnInPlace()

void Dragengine.Scenery.Locomotion.setCanTurnInPlace ( bool  canTurnInPlace)

Set if actor can turn in-place if looking beyond limits.

◆ setCCTTiltBackLeft()

void Dragengine.Scenery.Locomotion.setCCTTiltBackLeft ( ColliderCollisionTest  collisionTest)

Set back left collider collision test for tilt calculation or null if not set.

◆ setCCTTiltBackRight()

void Dragengine.Scenery.Locomotion.setCCTTiltBackRight ( ColliderCollisionTest  collisionTest)

Set back right collider collision test for tilt calculation or NULL if not set.

◆ setCCTTiltFrontLeft()

void Dragengine.Scenery.Locomotion.setCCTTiltFrontLeft ( ColliderCollisionTest  collisionTest)

Set front left collider collision test for tilt calculation or null if not set.

◆ setCCTTiltFrontRight()

void Dragengine.Scenery.Locomotion.setCCTTiltFrontRight ( ColliderCollisionTest  collisionTest)

Set front right collider collision test for tilt calculation or null if not set.

◆ setCCTTiltSingle()

void Dragengine.Scenery.Locomotion.setCCTTiltSingle ( ColliderCollisionTest  collisionTest)

Set single collider collision test for tilt calculation or null if not set.

◆ setIsMoving()

void Dragengine.Scenery.Locomotion.setIsMoving ( bool  isMoving)

Set determine if the actor is moving direct or analog.

◆ setIsTurningIP()

void Dragengine.Scenery.Locomotion.setIsTurningIP ( bool  turnInPlace)

Set if the actor is turning in place.

◆ setLimitLookDown()

void Dragengine.Scenery.Locomotion.setLimitLookDown ( float  limit)

Set looking down limit angle in degrees.

◆ setLimitLookLeft()

void Dragengine.Scenery.Locomotion.setLimitLookLeft ( float  limit)

Set looking left limit in degrees.

◆ setLimitLookRight()

void Dragengine.Scenery.Locomotion.setLimitLookRight ( float  limit)

Set looking right limit in degrees.

◆ setLimitLookUp()

void Dragengine.Scenery.Locomotion.setLimitLookUp ( float  limit)

Set looking up limit angle in degrees.

◆ setLimitTiltDown()

void Dragengine.Scenery.Locomotion.setLimitTiltDown ( float  limit)

Set tilt down limit in degrees.

◆ setLimitTiltLeft()

void Dragengine.Scenery.Locomotion.setLimitTiltLeft ( float  limit)

Set tilt left limit in degrees.

◆ setLimitTiltRight()

void Dragengine.Scenery.Locomotion.setLimitTiltRight ( float  limit)

Set Tilt right limit in degrees.

◆ setLimitTiltUp()

void Dragengine.Scenery.Locomotion.setLimitTiltUp ( float  limit)

Set tilt up limit in degrees.

◆ setLimitTurnInPlaceLeft()

void Dragengine.Scenery.Locomotion.setLimitTurnInPlaceLeft ( float  limit)

Set looking left limit in degrees before turning in-place.

◆ setLimitTurnInPlaceRight()

void Dragengine.Scenery.Locomotion.setLimitTurnInPlaceRight ( float  limit)

Set looking right limit in degrees before turning in-place.

◆ setLinearVelocity()

void Dragengine.Scenery.Locomotion.setLinearVelocity ( Vector  velocity)

Set linear velocity.

◆ setLookHorizontal()

void Dragengine.Scenery.Locomotion.setLookHorizontal ( float  value)

Set look left-right value.

◆ setLookHorizontalGoal()

void Dragengine.Scenery.Locomotion.setLookHorizontalGoal ( float  goal)

Set look left-right goal.

◆ setLookVertical()

void Dragengine.Scenery.Locomotion.setLookVertical ( float  value)

Looking up-down value.

◆ setLookVerticalGoal()

void Dragengine.Scenery.Locomotion.setLookVerticalGoal ( float  goal)

Set looking up-down goal.

◆ setMovingDirection()

void Dragengine.Scenery.Locomotion.setMovingDirection ( float  direction)

Set movement direction relative to view orientation.

◆ setMovingOrientation()

void Dragengine.Scenery.Locomotion.setMovingOrientation ( float  orientation)

Set movement orientation in world space.

◆ setMovingSpeed()

void Dragengine.Scenery.Locomotion.setMovingSpeed ( float  speed)

Set movement speed.

For Non-FPS locomotion type this is negative for moving backward.

◆ setOrientation()

void Dragengine.Scenery.Locomotion.setOrientation ( float  orientation)

Set actor orientation in world space.

◆ setOrientationQuaternion()

void Dragengine.Scenery.Locomotion.setOrientationQuaternion ( Quaternion  orientation)

Set actor orientation as quaternion.

◆ setResetTimeTurnIP()

void Dragengine.Scenery.Locomotion.setResetTimeTurnIP ( bool  reset)

Set if the turn in place time linked controllers have to be reset.

◆ setResetTimeWalk()

void Dragengine.Scenery.Locomotion.setResetTimeWalk ( bool  reset)

Set if the walk/run time linked controllers have to be reset.

◆ setReverseTimeTurnIP()

void Dragengine.Scenery.Locomotion.setReverseTimeTurnIP ( bool  reverse)

Set if the turn in place time linked controllers have to be reversed.

◆ setStance()

void Dragengine.Scenery.Locomotion.setStance ( float  stance)

Set stance value.

◆ setStanceGoal()

void Dragengine.Scenery.Locomotion.setStanceGoal ( float  stance)

Set stance goal value.

◆ setTiltHorizontal()

void Dragengine.Scenery.Locomotion.setTiltHorizontal ( float  tiltHorizontal)

Set current tilt left/right angle in degrees.

◆ setTiltHorizontalGoal()

void Dragengine.Scenery.Locomotion.setTiltHorizontalGoal ( float  tiltHorizontal)

Set goal tilt left/right angle in degrees.

◆ setTiltMode()

void Dragengine.Scenery.Locomotion.setTiltMode ( LocomotionTilt  mode)

Set tilt mode.

◆ setTiltOffset()

void Dragengine.Scenery.Locomotion.setTiltOffset ( float  offset)

Set tilt offset in meters.

◆ setTiltVertical()

void Dragengine.Scenery.Locomotion.setTiltVertical ( float  tiltVertical)

Set current tilt up/down angle in degrees.

◆ setTiltVerticalGoal()

void Dragengine.Scenery.Locomotion.setTiltVerticalGoal ( float  tiltVertical)

Set goal tilt up/down angle in degrees.

◆ setTurnAdjustLookHorizontal()

void Dragengine.Scenery.Locomotion.setTurnAdjustLookHorizontal ( bool  turnAdjust)

Set if looking left-right is adjusted while turning.

◆ setTurnHorizontal()

void Dragengine.Scenery.Locomotion.setTurnHorizontal ( float  value)

Set turn left-right value.

◆ setTurningSpeed()

void Dragengine.Scenery.Locomotion.setTurningSpeed ( float  speed)

Set turning speed in meters per second.

◆ setTurnIP()

void Dragengine.Scenery.Locomotion.setTurnIP ( float  value)

Set turn in place value.

◆ setUpdateAIColliderAngularVelocity()

void Dragengine.Scenery.Locomotion.setUpdateAIColliderAngularVelocity ( bool  updateAngularVelocity)

Set if the angular velocity of the AI collider is updated.

◆ updateAICollider()

void Dragengine.Scenery.Locomotion.updateAICollider ( )

Update AI collider linear and angular velocity.

◆ updateAnimatorInstance()

void Dragengine.Scenery.Locomotion.updateAnimatorInstance ( float  elapsed)

Update animator instance controllers if set with locomotion parameters.

◆ updateIsMoving()

void Dragengine.Scenery.Locomotion.updateIsMoving ( )

Update is moving.

◆ updateLinearVelocity()

void Dragengine.Scenery.Locomotion.updateLinearVelocity ( float  elapsed)

Update linear velocity.

◆ updateLocomotion()

void Dragengine.Scenery.Locomotion.updateLocomotion ( float  elapsed)

Update locomotion.

◆ updateLooking()

void Dragengine.Scenery.Locomotion.updateLooking ( float  elapsed)

Update looking.

◆ updateMovementDirection()

void Dragengine.Scenery.Locomotion.updateMovementDirection ( float  elapsed)

Update moving direction for FPS locomotion.

◆ updateOrientation()

void Dragengine.Scenery.Locomotion.updateOrientation ( float  elapsed)

Update orientation.

◆ updatePostLocomotion()

void Dragengine.Scenery.Locomotion.updatePostLocomotion ( float  elapsed)

Update locomotion after physics calculations.

◆ updateStance()

void Dragengine.Scenery.Locomotion.updateStance ( float  elapsed)

Update stance.

◆ updateTilt()

void Dragengine.Scenery.Locomotion.updateTilt ( float  elapsed)

Update body tilting.

◆ writeToFile()

void Dragengine.Scenery.Locomotion.writeToFile ( FileWriter  writer)

Write locomotion state to file writer.

Saves all parameters except:

  • Controller Mappings
  • Assigned AI Collider

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