Drag[en]gine Script Module DragonScript Script API  1.0
Locomotion Class Reference

Locomotion. More...

Inheritance diagram for Locomotion:

Classes

enum  eControllerAttributes
 
enum  eTiltModes
 

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...
 
bool getMoveApplyLookLeftRight ()
 Actor turns during moving due to looking left-right. More...
 
void setMoveApplyLookLeftRight (bool applyLookLeftRight)
 Set if actor turns during moving due to looking left-right. 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 getAdjustTimeUpDown ()
 Look up-down adjustment time in seconds. More...
 
void setAdjustTimeUpDown (float time)
 Set look up-down adjustment time in seconds. More...
 
float getLookUpDownGoal ()
 Looking up-down goal. More...
 
void setLookUpDownGoal (float goal)
 Set looking up-down goal. More...
 
float getLookUpDown ()
 Looking up-down value. More...
 
void setLookUpDown (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 getAdjustTimeLeftRight ()
 Look left-right adjustment time in seconds. More...
 
void setAdjustTimeLeftRight (float time)
 Set look left-right adjustment time in seconds. More...
 
float getLookLeftRightGoal ()
 Look left-right goal. More...
 
void setLookLeftRightGoal (float goal)
 Set look left-right goal. More...
 
float getLookLeftRight ()
 Look left-right value. More...
 
void setLookLeftRight (float value)
 Set look left-right value. More...
 
bool getTurnAdjustLookLeftRight ()
 Adjust looking left-right while turning. 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.

Author
Roland Pl├╝ss
Version
1.0
Date
2015

Member Function Documentation

§ getAdjustTimeLeftRight()

float getAdjustTimeLeftRight ( )

Look left-right adjustment time in seconds.

§ getAdjustTimeUpDown()

float getAdjustTimeUpDown ( )

Look up-down adjustment time in seconds.

§ getCanTurn()

bool getCanTurn ( )

Determine if the actor can turn.

§ getLimitLookDown()

float getLimitLookDown ( )

Looking down limit angle in degrees.

§ getLimitLookLeft()

float getLimitLookLeft ( )

Looking left limit in degrees.

§ getLimitLookRight()

float getLimitLookRight ( )

Looking right limit in degrees.

§ getLimitLookUp()

float getLimitLookUp ( )

Looking up limit angle in degrees.

§ getLookLeftRight()

float getLookLeftRight ( )

Look left-right value.

§ getLookLeftRightGoal()

float getLookLeftRightGoal ( )

Look left-right goal.

§ getLookUpDown()

float getLookUpDown ( )

Looking up-down value.

§ getLookUpDownGoal()

float getLookUpDownGoal ( )

Looking up-down goal.

§ getMoveApplyLookLeftRight()

bool getMoveApplyLookLeftRight ( )

Actor turns during moving due to looking left-right.

§ getTurnAdjustLookLeftRight()

bool getTurnAdjustLookLeftRight ( )

Adjust looking left-right while turning.

§ new()

Locomotion new ( )

Create locomotion.

§ setAdjustTimeLeftRight()

void setAdjustTimeLeftRight ( float  time)

Set look left-right adjustment time in seconds.

§ setAdjustTimeUpDown()

void setAdjustTimeUpDown ( float  time)

Set look up-down adjustment time in seconds.

§ setCanTurn()

void setCanTurn ( bool  canTurn)

Set if the actor can turn.

§ setLimitLookDown()

void setLimitLookDown ( float  limit)

Set looking down limit angle in degrees.

§ setLimitLookLeft()

void setLimitLookLeft ( float  limit)

Set looking left limit in degrees.

§ setLimitLookRight()

void setLimitLookRight ( float  limit)

Set looking right limit in degrees.

§ setLimitLookUp()

void setLimitLookUp ( float  limit)

Set looking up limit angle in degrees.

§ setLookLeftRight()

void setLookLeftRight ( float  value)

Set look left-right value.

§ setLookLeftRightGoal()

void setLookLeftRightGoal ( float  goal)

Set look left-right goal.

§ setLookUpDown()

void setLookUpDown ( float  value)

Looking up-down value.

§ setLookUpDownGoal()

void setLookUpDownGoal ( float  goal)

Set looking up-down goal.

§ setMoveApplyLookLeftRight()

void setMoveApplyLookLeftRight ( bool  applyLookLeftRight)

Set if actor turns during moving due to looking left-right.


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