Drag[en]gine Script Module DragonScript 1.35
Loading...
Searching...
No Matches
Dragengine.Scenery.Locomotion Class Reference

Locomotion. More...

Inheritance diagram for Dragengine.Scenery.Locomotion:

Public Member Functions

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

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.

Referenced by writeToFile().

◆ 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

References getAdjustTimeTiltVertical(), and setTiltVerticalGoal().

Referenced by writeToFile().

◆ applyStates()

void Dragengine.Scenery.Locomotion.applyStates ( )

Apply states without interpolation or smoothing.

References setCCTTiltFrontRight().

Referenced by writeToFile().

◆ 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

References getStanceGoal(), setStance(), and setStanceGoal().

Referenced by writeToFile().

◆ 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

References getTiltMode(), and setTiltMode().

Referenced by writeToFile().

◆ 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

References getCanTilt(), and setCanTilt().

Referenced by writeToFile().

◆ cancelTurnInPlace()

void Dragengine.Scenery.Locomotion.cancelTurnInPlace ( )

Cancel turning in-place.

Resets these parameters:

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

Referenced by writeToFile().

◆ forceBodyAdjustment()

void Dragengine.Scenery.Locomotion.forceBodyAdjustment ( )

Force body adjustment.

References setCCTTiltFrontLeft(), and setCCTTiltSingle().

Referenced by writeToFile().

◆ getAbsMovingSpeed()

float Dragengine.Scenery.Locomotion.getAbsMovingSpeed ( )

Absolute movement speed.

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

References setReverseTimeTurnIP().

Referenced by setCCTTiltBackLeft().

◆ getAdjustRangeAnalogMovingHorizontal()

float Dragengine.Scenery.Locomotion.getAdjustRangeAnalogMovingHorizontal ( )

Analog looking left-right adjustment range.

References setAngularVelocity().

Referenced by getResetTimeWalk().

◆ getAdjustRangeHorizontal()

float Dragengine.Scenery.Locomotion.getAdjustRangeHorizontal ( )

Look left-right adjustment range.

References setLookVertical().

Referenced by setAnalogMovingVertical().

◆ getAdjustRangeLinearVelocity()

float Dragengine.Scenery.Locomotion.getAdjustRangeLinearVelocity ( )

Linear velocity adjustment range in meters per second.

Referenced by getAdjustTimeTiltVertical().

◆ getAdjustRangeStance()

float Dragengine.Scenery.Locomotion.getAdjustRangeStance ( )

Adjustment range for stance.

References getAnalogMovingHorizontal().

Referenced by setTiltOffset().

◆ getAdjustRangeTiltHorizontal()

float Dragengine.Scenery.Locomotion.getAdjustRangeTiltHorizontal ( )

Tilt left/right adjust range.

Referenced by writeToFile().

◆ getAdjustRangeTiltVertical()

float Dragengine.Scenery.Locomotion.getAdjustRangeTiltVertical ( )

Tilt up/down adjust range.

References setAdjustRangeLinearVelocity().

Referenced by removeAllControllerMappings().

◆ getAdjustRangeVertical()

float Dragengine.Scenery.Locomotion.getAdjustRangeVertical ( )

Look up-down adjustment range.

Referenced by setLookVertical().

◆ getAdjustTimeAnalogMovingHorizontal()

float Dragengine.Scenery.Locomotion.getAdjustTimeAnalogMovingHorizontal ( )

Analog looking left-right adjustment time in seconds.

References getAngularVelocity().

Referenced by getMovingDirectionVector().

◆ getAdjustTimeHorizontal()

float Dragengine.Scenery.Locomotion.getAdjustTimeHorizontal ( )

Look left-right adjustment time in seconds.

References getLookVertical().

Referenced by setTurnAdjustLookHorizontal().

◆ getAdjustTimeLinearVelocity()

float Dragengine.Scenery.Locomotion.getAdjustTimeLinearVelocity ( )

Linear velocity adjustment time in seconds.

References getLimitTurnInPlaceLeft().

Referenced by setTiltVertical().

◆ getAdjustTimeOrientation()

float Dragengine.Scenery.Locomotion.getAdjustTimeOrientation ( )

Orientation adjustment time in seconds.

Referenced by getResetTimeTurnIP().

◆ getAdjustTimeStance()

float Dragengine.Scenery.Locomotion.getAdjustTimeStance ( )

Adjustment time for stance in seconds.

Referenced by getTiltOffset().

◆ getAdjustTimeTiltHorizontal()

float Dragengine.Scenery.Locomotion.getAdjustTimeTiltHorizontal ( )

Tilt left/right adjust time in seconds.

References getResetTimeWalk().

Referenced by writeToFile().

◆ getAdjustTimeTiltVertical()

float Dragengine.Scenery.Locomotion.getAdjustTimeTiltVertical ( )

Tilt up/down adjust time in seconds.

References getAdjustRangeLinearVelocity().

Referenced by adjustOrientation().

◆ getAdjustTimeTurnIP()

float Dragengine.Scenery.Locomotion.getAdjustTimeTurnIP ( )

Adjustment time in seconds for turning in-place.

Referenced by setAnalogMovingHorizontal().

◆ getAdjustTimeVertical()

float Dragengine.Scenery.Locomotion.getAdjustTimeVertical ( )

Look up-down adjustment time in seconds.

References setLimitLookUp().

Referenced by getLookVerticalGoal().

◆ getAICollider()

Collider Dragengine.Scenery.Locomotion.getAICollider ( )

AI collider to update or NULL if not used.

References setAdjustRangeTiltVertical().

Referenced by writeToFile().

◆ getAlwaysLimitLeftRight()

bool Dragengine.Scenery.Locomotion.getAlwaysLimitLeftRight ( )

Look left/right is always limited.

Version
1.26

References getAlwaysLimitLeftRight().

Referenced by getAlwaysLimitLeftRight().

◆ getAnalogMovingHorizontal()

float Dragengine.Scenery.Locomotion.getAnalogMovingHorizontal ( )

Analog looking left-right.

Referenced by getAdjustRangeStance().

◆ getAnalogMovingHorizontalGoal()

float Dragengine.Scenery.Locomotion.getAnalogMovingHorizontalGoal ( )

Analog looking left-right goal.

References getIsTurningIP().

Referenced by setResetTimeWalk().

◆ getAnalogMovingSpeed()

float Dragengine.Scenery.Locomotion.getAnalogMovingSpeed ( )

Analog moving speed.

References setAdjustTimeTurnIP().

Referenced by getStanceGoal().

◆ getAnalogMovingVertical()

float Dragengine.Scenery.Locomotion.getAnalogMovingVertical ( )

Analog looking up-down.

Referenced by setAngularVelocity().

◆ getAngularVelocity()

Vector Dragengine.Scenery.Locomotion.getAngularVelocity ( )

Angular velocity of the actor turning.

Referenced by getAdjustTimeAnalogMovingHorizontal().

◆ getCanTilt()

bool Dragengine.Scenery.Locomotion.getCanTilt ( )

Determine if the actor can tilt the body.

References getIsMoving().

Referenced by cancelMovement().

◆ getCanTurn()

bool Dragengine.Scenery.Locomotion.getCanTurn ( )

Determine if the actor can turn.

References getCanTurn().

Referenced by getCanTurn().

◆ getCanTurnInPlace()

bool Dragengine.Scenery.Locomotion.getCanTurnInPlace ( )

Actor can turn in-place if looking beyond limits.

References setOrientation().

Referenced by setMovingSpeed().

◆ getIsMoving()

bool Dragengine.Scenery.Locomotion.getIsMoving ( )

Determine if the actor is moving direct or analog.

References setTurnIP().

Referenced by getCanTilt().

◆ getIsTurningIP()

bool Dragengine.Scenery.Locomotion.getIsTurningIP ( )

Determine if the actor is turning in place.

References setAnalogMovingVertical().

Referenced by getAnalogMovingHorizontalGoal().

◆ getLimitLookDown()

float Dragengine.Scenery.Locomotion.getLimitLookDown ( )

Looking down limit angle in degrees.

References getLimitLookUp().

Referenced by setAdjustTimeVertical().

◆ getLimitLookLeft()

float Dragengine.Scenery.Locomotion.getLimitLookLeft ( )

Looking left limit in degrees.

References setAdjustRangeVertical().

Referenced by getLookHorizontalGoal().

◆ getLimitLookRight()

float Dragengine.Scenery.Locomotion.getLimitLookRight ( )

Looking right limit in degrees.

Referenced by setLookHorizontal().

◆ getLimitLookUp()

float Dragengine.Scenery.Locomotion.getLimitLookUp ( )

Looking up limit angle in degrees.

Referenced by getLimitLookDown().

◆ getLimitTiltDown()

float Dragengine.Scenery.Locomotion.getLimitTiltDown ( )

Tilt down limit in degrees.

References getLinearVelocity().

Referenced by updateTilt().

◆ getLimitTiltLeft()

float Dragengine.Scenery.Locomotion.getLimitTiltLeft ( )

Tilt left limit in degrees.

Referenced by getUpdateAIColliderAngularVelocity().

◆ getLimitTiltRight()

float Dragengine.Scenery.Locomotion.getLimitTiltRight ( )

Tilt right limit in degrees.

References getMovingDirection().

Referenced by setUpdateAIColliderAngularVelocity().

◆ getLimitTiltUp()

float Dragengine.Scenery.Locomotion.getLimitTiltUp ( )

Tilt up limit in degrees.

References setMovingSpeed().

Referenced by updateLinearVelocity().

◆ getLimitTurnInPlaceLeft()

float Dragengine.Scenery.Locomotion.getLimitTurnInPlaceLeft ( )

Looking left limit in degrees before turning in-place.

References getOrientationQuaternion().

Referenced by getAdjustTimeLinearVelocity().

◆ getLimitTurnInPlaceRight()

float Dragengine.Scenery.Locomotion.getLimitTurnInPlaceRight ( )

Looking right limit in degrees before turning in-place.

Referenced by setAdjustRangeLinearVelocity().

◆ getLinearVelocity()

Vector Dragengine.Scenery.Locomotion.getLinearVelocity ( )

Linear velocity.

References setCanTurnInPlace().

Referenced by getLimitTiltDown().

◆ getLookHorizontal()

float Dragengine.Scenery.Locomotion.getLookHorizontal ( )

Look left-right value.

References setLimitLookLeft().

Referenced by getOrientation().

◆ getLookHorizontalGoal()

float Dragengine.Scenery.Locomotion.getLookHorizontalGoal ( )

Look left-right goal.

References getLimitLookLeft().

Referenced by setTurnHorizontal().

◆ getLookVertical()

float Dragengine.Scenery.Locomotion.getLookVertical ( )

Looking up-down value.

References setAdjustTimeVertical().

Referenced by getAdjustTimeHorizontal().

◆ getLookVerticalGoal()

float Dragengine.Scenery.Locomotion.getLookVerticalGoal ( )

Looking up-down goal.

References getAdjustTimeVertical().

Referenced by setLimitLookLeft().

◆ getMovingDirection()

float Dragengine.Scenery.Locomotion.getMovingDirection ( )

Movement direction relative to view orientation.

Referenced by getLimitTiltRight().

◆ getMovingDirectionVector()

Vector Dragengine.Scenery.Locomotion.getMovingDirectionVector ( )

Movement direction vector relative to view orientation.

References getAdjustTimeAnalogMovingHorizontal().

Referenced by getTiltHorizontal().

◆ getMovingOrientation()

float Dragengine.Scenery.Locomotion.getMovingOrientation ( )

Movement orientation in world space.

References setLimitTurnInPlaceRight().

Referenced by setAdjustRangeTiltVertical().

◆ getMovingSpeed()

float Dragengine.Scenery.Locomotion.getMovingSpeed ( )

Relative movement speed.

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

References getReverseTimeTurnIP(), and setResetTimeTurnIP().

Referenced by setCCTTiltSingle().

◆ getOrientation()

float Dragengine.Scenery.Locomotion.getOrientation ( )

Actor orientation in world space.

References getLookHorizontal().

Referenced by setReverseTimeTurnIP().

◆ getOrientationQuaternion()

Quaternion Dragengine.Scenery.Locomotion.getOrientationQuaternion ( )

Actor orientation as quaternion.

References setLookHorizontal().

Referenced by getLimitTurnInPlaceLeft().

◆ getResetTimeTurnIP()

bool Dragengine.Scenery.Locomotion.getResetTimeTurnIP ( )

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

References getAdjustTimeOrientation().

Referenced by setIsMoving().

◆ getResetTimeWalk()

bool Dragengine.Scenery.Locomotion.getResetTimeWalk ( )

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

References getAdjustRangeAnalogMovingHorizontal().

Referenced by getAdjustTimeTiltHorizontal().

◆ getReverseTimeTurnIP()

bool Dragengine.Scenery.Locomotion.getReverseTimeTurnIP ( )

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

References setAdjustTimeOrientation().

Referenced by getMovingSpeed().

◆ getStance()

float Dragengine.Scenery.Locomotion.getStance ( )

Stance value.

References setAnalogMovingHorizontal().

Referenced by setTiltOffset().

◆ getStanceGoal()

float Dragengine.Scenery.Locomotion.getStanceGoal ( )

Stance goal value.

References getAnalogMovingSpeed().

Referenced by cancelInput().

◆ getTiltHorizontal()

float Dragengine.Scenery.Locomotion.getTiltHorizontal ( )

Current tilt left/right angle in degrees.

References getMovingDirectionVector().

Referenced by readFromFile().

◆ getTiltHorizontalGoal()

float Dragengine.Scenery.Locomotion.getTiltHorizontalGoal ( )

Goal tilt left/right angle in degrees.

References setMovingDirection().

Referenced by writeToFile().

◆ getTiltMode()

LocomotionTilt Dragengine.Scenery.Locomotion.getTiltMode ( )

Tilt mode.

References setIsMoving().

Referenced by cancelMotion().

◆ getTiltOffset()

float Dragengine.Scenery.Locomotion.getTiltOffset ( )

Tilt offset in meters.

References getAdjustTimeStance().

Referenced by writeToFile().

◆ getTiltVertical()

float Dragengine.Scenery.Locomotion.getTiltVertical ( )

Current tilt up/down angle in degrees.

References setLinearVelocity().

Referenced by updateAICollider().

◆ getTiltVerticalGoal()

float Dragengine.Scenery.Locomotion.getTiltVerticalGoal ( )

Goal tilt up/down angle in degrees.

Referenced by updateAICollider().

◆ getTurnAdjustLookHorizontal()

bool Dragengine.Scenery.Locomotion.getTurnAdjustLookHorizontal ( )

Adjust looking left-right while turning.

Referenced by setOrientationQuaternion().

◆ getTurnHorizontal()

float Dragengine.Scenery.Locomotion.getTurnHorizontal ( )

Turn left-right value.

References setAdjustRangeHorizontal().

Referenced by setAdjustTimeTurnIP().

◆ getTurningSpeed()

float Dragengine.Scenery.Locomotion.getTurningSpeed ( )

Turning speed in meters per second.

Referenced by setLimitTurnInPlaceRight().

◆ getTurnIP()

float Dragengine.Scenery.Locomotion.getTurnIP ( )

Turn in place value.

References setTurnHorizontal().

Referenced by setAnalogMovingSpeed().

◆ getUpdateAIColliderAngularVelocity()

Collider Dragengine.Scenery.Locomotion.getUpdateAIColliderAngularVelocity ( )

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

References getLimitTiltLeft().

Referenced by writeToFile().

◆ new()

Locomotion Dragengine.Scenery.Locomotion.new ( )

Create locomotion.

References new().

Referenced by new().

◆ readFromFile()

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

Read locomotion state from file reader.

Restores all parameters except:

  • Controller Mappings
  • Assigned AI Collider

References getTiltHorizontal(), and setTiltHorizontal().

Referenced by writeToFile().

◆ removeAllControllerMappings()

void Dragengine.Scenery.Locomotion.removeAllControllerMappings ( )

Remove all controller mappings.

References getAdjustRangeTiltVertical().

Referenced by writeToFile().

◆ removeControllerMapping()

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

Remove controller mapping if present.

References setAdjustTimeTiltVertical().

Referenced by writeToFile().

◆ setAdjustRangeAnalogMovingHorizontal()

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

Set analog looking left-right adjustment range.

Referenced by setResetTimeWalk().

◆ setAdjustRangeHorizontal()

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

Set look left-right adjustment range.

Referenced by getTurnHorizontal().

◆ setAdjustRangeLinearVelocity()

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

Set linear velocity adjustment range in meters per second.

References getLimitTurnInPlaceRight().

Referenced by getAdjustRangeTiltVertical().

◆ setAdjustRangeStance()

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

Adjustment range for stance.

Referenced by setTiltOffset().

◆ setAdjustRangeTiltHorizontal()

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

Set tilt left/right afjust range.

Referenced by writeToFile().

◆ setAdjustRangeTiltVertical()

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

Set tilt up/down afjust range.

References getMovingOrientation().

Referenced by getAICollider().

◆ setAdjustRangeVertical()

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

Set look up-down adjustment range.

References setLimitLookDown().

Referenced by getLimitLookLeft().

◆ setAdjustTimeAnalogMovingHorizontal()

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

Set analog looking left-right adjustment time in seconds.

Referenced by setMovingDirection().

◆ setAdjustTimeHorizontal()

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

Set look left-right adjustment time in seconds.

Referenced by setAnalogMovingVertical().

◆ setAdjustTimeLinearVelocity()

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

Set linear velocity adjustment time in seconds.

References setLimitTurnInPlaceLeft().

Referenced by setTiltVerticalGoal().

◆ setAdjustTimeOrientation()

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

Set orientation adjustment time in seconds.

References setLookHorizontalGoal().

Referenced by getReverseTimeTurnIP().

◆ setAdjustTimeStance()

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

Adjustment time for stance in seconds.

References setAnalogMovingHorizontalGoal().

Referenced by setTiltOffset().

◆ setAdjustTimeTiltHorizontal()

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

Set tilt left/right afjust time in seconds.

References setResetTimeWalk().

Referenced by writeToFile().

◆ setAdjustTimeTiltVertical()

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

Set tilt up/down afjust time in seconds.

Referenced by removeControllerMapping().

◆ setAdjustTimeTurnIP()

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

Set adjustment time in seconds for turning in-place.

References getTurnHorizontal().

Referenced by getAnalogMovingSpeed().

◆ setAdjustTimeVertical()

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

Set look up-down adjustment time in seconds.

References getLimitLookDown().

Referenced by getLookVertical().

◆ setAICollider()

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

Set AI collider to update or NULL if not used.

Referenced by writeToFile().

◆ setAlwaysLimitLeftRight()

void Dragengine.Scenery.Locomotion.setAlwaysLimitLeftRight ( bool alwaysLimitLeftRight)

Set if look left/right is always limited.

Version
1.26

References setAlwaysLimitLeftRight().

Referenced by setAlwaysLimitLeftRight().

◆ setAnalogMovingHorizontal()

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

Set analog looking left-right.

References getAdjustTimeTurnIP().

Referenced by getStance().

◆ setAnalogMovingHorizontalGoal()

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

Set analog looking left-right goal.

References setIsTurningIP().

Referenced by setAdjustTimeStance().

◆ setAnalogMovingSpeed()

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

Set analog moving speed.

References getTurnIP().

Referenced by setStanceGoal().

◆ setAnalogMovingVertical()

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

Set analog looking up-down.

References getAdjustRangeHorizontal(), and setAdjustTimeHorizontal().

Referenced by getIsTurningIP().

◆ setAngularVelocity()

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

Set angular velocity of the actor turning.

References getAnalogMovingVertical().

Referenced by getAdjustRangeAnalogMovingHorizontal().

◆ setCanTilt()

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

Set if the actor can tilt the body.

Referenced by cancelMovement().

◆ setCanTurn()

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

Set if the actor can turn.

References setCanTurn().

Referenced by setCanTurn().

◆ setCanTurnInPlace()

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

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

Referenced by getLinearVelocity().

◆ setCCTTiltBackLeft()

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

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

References getAbsMovingSpeed().

Referenced by updateLocomotion().

◆ setCCTTiltBackRight()

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

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

Referenced by updateIsMoving().

◆ setCCTTiltFrontLeft()

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

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

Referenced by forceBodyAdjustment().

◆ setCCTTiltFrontRight()

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

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

Referenced by applyStates().

◆ setCCTTiltSingle()

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

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

References getMovingSpeed().

Referenced by forceBodyAdjustment().

◆ setIsMoving()

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

Set determine if the actor is moving direct or analog.

References getResetTimeTurnIP().

Referenced by getTiltMode().

◆ setIsTurningIP()

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

Set if the actor is turning in place.

Referenced by setAnalogMovingHorizontalGoal().

◆ setLimitLookDown()

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

Set looking down limit angle in degrees.

Referenced by setAdjustRangeVertical().

◆ setLimitLookLeft()

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

Set looking left limit in degrees.

References getLookVerticalGoal().

Referenced by getLookHorizontal().

◆ setLimitLookRight()

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

Set looking right limit in degrees.

References setLookVerticalGoal().

Referenced by setTurnAdjustLookHorizontal().

◆ setLimitLookUp()

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

Set looking up limit angle in degrees.

Referenced by getAdjustTimeVertical().

◆ setLimitTiltDown()

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

Set tilt down limit in degrees.

Referenced by updateAICollider().

◆ setLimitTiltLeft()

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

Set tilt left limit in degrees.

References setMovingOrientation().

Referenced by setUpdateAIColliderAngularVelocity().

◆ setLimitTiltRight()

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

Set Tilt right limit in degrees.

Referenced by setUpdateAIColliderAngularVelocity().

◆ setLimitTiltUp()

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

Set tilt up limit in degrees.

Referenced by updatePostLocomotion().

◆ setLimitTurnInPlaceLeft()

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

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

References setOrientationQuaternion().

Referenced by setAdjustTimeLinearVelocity().

◆ setLimitTurnInPlaceRight()

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

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

References getTurningSpeed(), and setTurningSpeed().

Referenced by getMovingOrientation().

◆ setLinearVelocity()

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

Set linear velocity.

Referenced by getTiltVertical().

◆ setLookHorizontal()

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

Set look left-right value.

References getLimitLookRight().

Referenced by getOrientationQuaternion().

◆ setLookHorizontalGoal()

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

Set look left-right goal.

Referenced by setAdjustTimeOrientation().

◆ setLookVertical()

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

Looking up-down value.

References getAdjustRangeVertical().

Referenced by getAdjustRangeHorizontal().

◆ setLookVerticalGoal()

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

Set looking up-down goal.

Referenced by setLimitLookRight().

◆ setMovingDirection()

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

Set movement direction relative to view orientation.

References setAdjustTimeAnalogMovingHorizontal().

Referenced by getTiltHorizontalGoal().

◆ setMovingOrientation()

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

Set movement orientation in world space.

Referenced by setLimitTiltLeft().

◆ setMovingSpeed()

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

Set movement speed.

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

References getCanTurnInPlace().

Referenced by getLimitTiltUp().

◆ setOrientation()

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

Set actor orientation in world space.

Referenced by getCanTurnInPlace().

◆ setOrientationQuaternion()

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

Set actor orientation as quaternion.

References getTurnAdjustLookHorizontal().

Referenced by setLimitTurnInPlaceLeft().

◆ setResetTimeTurnIP()

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

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

Referenced by getMovingSpeed().

◆ setResetTimeWalk()

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

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

References getAnalogMovingHorizontalGoal(), and setAdjustRangeAnalogMovingHorizontal().

Referenced by setAdjustTimeTiltHorizontal().

◆ setReverseTimeTurnIP()

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

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

References getOrientation().

Referenced by getAbsMovingSpeed().

◆ setStance()

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

Set stance value.

Referenced by cancelInput().

◆ setStanceGoal()

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

Set stance goal value.

References setAnalogMovingSpeed().

Referenced by cancelInput().

◆ setTiltHorizontal()

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

Set current tilt left/right angle in degrees.

Referenced by readFromFile().

◆ setTiltHorizontalGoal()

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

Set goal tilt left/right angle in degrees.

Referenced by writeToFile().

◆ setTiltMode()

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

Set tilt mode.

Referenced by cancelMotion().

◆ setTiltOffset()

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

Set tilt offset in meters.

References getAdjustRangeStance(), getStance(), setAdjustRangeStance(), and setAdjustTimeStance().

Referenced by writeToFile().

◆ setTiltVertical()

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

Set current tilt up/down angle in degrees.

References getAdjustTimeLinearVelocity().

Referenced by updateAICollider().

◆ setTiltVerticalGoal()

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

Set goal tilt up/down angle in degrees.

References setAdjustTimeLinearVelocity().

Referenced by adjustOrientation().

◆ setTurnAdjustLookHorizontal()

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

Set if looking left-right is adjusted while turning.

References getAdjustTimeHorizontal(), and setLimitLookRight().

Referenced by setTurningSpeed().

◆ setTurnHorizontal()

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

Set turn left-right value.

References getLookHorizontalGoal().

Referenced by getTurnIP().

◆ setTurningSpeed()

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

Set turning speed in meters per second.

References setTurnAdjustLookHorizontal().

Referenced by setLimitTurnInPlaceRight().

◆ setTurnIP()

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

Set turn in place value.

Referenced by getIsMoving().

◆ setUpdateAIColliderAngularVelocity()

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

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

References getLimitTiltRight(), setLimitTiltLeft(), and setLimitTiltRight().

Referenced by writeToFile().

◆ updateAICollider()

void Dragengine.Scenery.Locomotion.updateAICollider ( )

Update AI collider linear and angular velocity.

References getTiltVertical(), getTiltVerticalGoal(), setLimitTiltDown(), and setTiltVertical().

Referenced by writeToFile().

◆ updateAnimatorInstance()

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

Update animator instance controllers if set with locomotion parameters.

Referenced by writeToFile().

◆ updateIsMoving()

void Dragengine.Scenery.Locomotion.updateIsMoving ( )

Update is moving.

References setCCTTiltBackRight().

Referenced by writeToFile().

◆ updateLinearVelocity()

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

Update linear velocity.

References getLimitTiltUp().

Referenced by writeToFile().

◆ updateLocomotion()

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

Update locomotion.

References setCCTTiltBackLeft().

Referenced by writeToFile().

◆ updateLooking()

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

Update looking.

Referenced by writeToFile().

◆ updateOrientation()

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

Update orientation.

Referenced by writeToFile().

◆ updatePostLocomotion()

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

Update locomotion after physics calculations.

References setLimitTiltUp().

Referenced by writeToFile().

◆ updateStance()

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

Update stance.

Referenced by writeToFile().

◆ updateTilt()

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

Update body tilting.

References getLimitTiltDown().

Referenced by writeToFile().

◆ writeToFile()


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