Drag[en]gine Script Module DragonScript 1.32.1
Loading...
Searching...
No Matches
Dragengine.Scenery.ECBehaviorVRHandLocomotion.Instance Class Reference

Behavior instance. More...

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

Classes

class  TrackedInput
 Tracked input. More...
 

Public Member Functions

void addListener (Listener listener)
 Add listener.
 
void clearCommands ()
 Set all axis command to null.
 
void dispose ()
 Dispose of instance.
 
float getDeadzone ()
 Deadzone as percentage of range (0..1).
 
ECBehaviorVRHandLocomotion getECBehavior ()
 Behavior.
 
bool getEnabled ()
 Enabled.
 
TrackedInput getInputY ()
 Y axis input.
 
TrackedInput getInputZ ()
 Z axis input.
 
float getLinearity ()
 Linearity of input.
 
float getRange ()
 Input range in meters.
 
ECBehaviorVRHand.Instance getVRHand ()
 VR Hand.
 
void init (StubElement stub)
 Initialize behavior from stub.
 
bool isRunning ()
 Locomotion is running.
 
float mapInputValue (float input)
 Calculated mapped input value in the range -1..1 .
 
Instance new (ECBehaviorVRHandLocomotion ecbehavior, BehaviorElement element)
 Create instance.
 
void removeListener (Listener listener)
 Remove listener.
 
void setCommandsMove ()
 Set MoveLR as X axis command, MoveFB as Z axis command, and null as Y axis command.
 
void setCommandsTurn ()
 Set LookLR as X axis command and null as Y and Z axis command.
 
void setCommandsTurnMove ()
 Set LookLR as X axis command and MoveFB as Z axis command, and null as Y axis command.
 
void setDeadzone (float deadzone)
 Set deadzone as percentage of range (0..1).
 
void setEnabled (bool enabled)
 Set enabled.
 
void setLinearity (float linearity)
 Set linearity of input.
 
void setRange (float range)
 Set input range in meters.
 
void start ()
 Start locomotion.
 
void think (float elapsed)
 Frame update.
 
void update (float elapsed)
 Update input tracking.
 
- 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 writeToFile (PersistencyEnvironment env, FileWriter writer)
 Write behavior instance to file.
 

Public Attributes

ECComposeBTSM.Instance pBTSMs
 
ECBehaviorVRHandLocomotion pECBehavior
 
bool pEnabled
 
Vector pInputPosition
 
TrackedInput pInputX
 
Array pListeners
 
Matrix pOriginMatrix
 
ECBehaviorPlayerControllable.Instance pPlayerControllable
 
float pRange
 
ECBehaviorVRHand.Instance pVRHand
 
- Public Attributes inherited from Dragengine.Scenery.DefaultECBehaviorInstance
BehaviorElement pElement
 
int pInstanceIndex
 
bool pRequiresEnterFrame
 
bool pRequiresThink
 

Protected Member Functions

float calcLinearityFactor ()
 Calculate linearity factor.
 
- 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

◆ addListener()

void Dragengine.Scenery.ECBehaviorVRHandLocomotion.Instance.addListener ( Listener  listener)

Add listener.

◆ calcLinearityFactor()

float Dragengine.Scenery.ECBehaviorVRHandLocomotion.Instance.calcLinearityFactor ( )
protected

Calculate linearity factor.

◆ clearCommands()

void Dragengine.Scenery.ECBehaviorVRHandLocomotion.Instance.clearCommands ( )

Set all axis command to null.

◆ dispose()

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

Dispose of instance.

Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.

◆ getDeadzone()

float Dragengine.Scenery.ECBehaviorVRHandLocomotion.Instance.getDeadzone ( )

Deadzone as percentage of range (0..1).

◆ getECBehavior()

ECBehaviorVRHandLocomotion Dragengine.Scenery.ECBehaviorVRHandLocomotion.Instance.getECBehavior ( )

Behavior.

◆ getEnabled()

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

Enabled.

◆ getInputY()

TrackedInput Dragengine.Scenery.ECBehaviorVRHandLocomotion.Instance.getInputY ( )

Y axis input.

◆ getInputZ()

TrackedInput Dragengine.Scenery.ECBehaviorVRHandLocomotion.Instance.getInputZ ( )

Z axis input.

◆ getLinearity()

float Dragengine.Scenery.ECBehaviorVRHandLocomotion.Instance.getLinearity ( )

Linearity of input.

Value of 0 is linear input. Values up to 1 map larger input range to small movement. Values down to -1 map larger input range to larger movement. 0.25 is the default.

Linearity is calculated like this:

Linearity Mapped value (x=input)
0 x
1/3 pow(x, 2)
2/3 pow(x, 4)
1 pow(x, 8)
-1/3 pow(x, 1/2)
-2/3 pow(x, 1/4)
-1 pow(x, 1/8)

◆ getRange()

float Dragengine.Scenery.ECBehaviorVRHandLocomotion.Instance.getRange ( )

Input range in meters.

◆ getVRHand()

ECBehaviorVRHand.Instance Dragengine.Scenery.ECBehaviorVRHandLocomotion.Instance.getVRHand ( )

VR Hand.

◆ init()

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

Initialize behavior from stub.

Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.

◆ isRunning()

bool Dragengine.Scenery.ECBehaviorVRHandLocomotion.Instance.isRunning ( )

Locomotion is running.

◆ mapInputValue()

float Dragengine.Scenery.ECBehaviorVRHandLocomotion.Instance.mapInputValue ( float  input)

Calculated mapped input value in the range -1..1 .

◆ new()

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

Create instance.

◆ removeListener()

void Dragengine.Scenery.ECBehaviorVRHandLocomotion.Instance.removeListener ( Listener  listener)

Remove listener.

◆ setCommandsMove()

void Dragengine.Scenery.ECBehaviorVRHandLocomotion.Instance.setCommandsMove ( )

Set MoveLR as X axis command, MoveFB as Z axis command, and null as Y axis command.

◆ setCommandsTurn()

void Dragengine.Scenery.ECBehaviorVRHandLocomotion.Instance.setCommandsTurn ( )

Set LookLR as X axis command and null as Y and Z axis command.

◆ setCommandsTurnMove()

void Dragengine.Scenery.ECBehaviorVRHandLocomotion.Instance.setCommandsTurnMove ( )

Set LookLR as X axis command and MoveFB as Z axis command, and null as Y axis command.

◆ setDeadzone()

void Dragengine.Scenery.ECBehaviorVRHandLocomotion.Instance.setDeadzone ( float  deadzone)

Set deadzone as percentage of range (0..1).

◆ setEnabled()

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

Set enabled.

◆ setLinearity()

void Dragengine.Scenery.ECBehaviorVRHandLocomotion.Instance.setLinearity ( float  linearity)

Set linearity of input.

See also
#getLinearity()

◆ setRange()

void Dragengine.Scenery.ECBehaviorVRHandLocomotion.Instance.setRange ( float  range)

Set input range in meters.

◆ start()

void Dragengine.Scenery.ECBehaviorVRHandLocomotion.Instance.start ( )

Start locomotion.

Has no effect if disabled, hand is not using hand interaction or already tracking.

◆ think()

void Dragengine.Scenery.ECBehaviorVRHandLocomotion.Instance.think ( float  elapsed)

Frame update.

Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.

◆ update()

void Dragengine.Scenery.ECBehaviorVRHandLocomotion.Instance.update ( float  elapsed)

Update input tracking.

Member Data Documentation

◆ pBTSMs

ECComposeBTSM.Instance Dragengine.Scenery.ECBehaviorVRHandLocomotion.Instance.pBTSMs

◆ pECBehavior

ECBehaviorVRHandLocomotion Dragengine.Scenery.ECBehaviorVRHandLocomotion.Instance.pECBehavior

◆ pEnabled

bool Dragengine.Scenery.ECBehaviorVRHandLocomotion.Instance.pEnabled

◆ pInputPosition

Vector Dragengine.Scenery.ECBehaviorVRHandLocomotion.Instance.pInputPosition

◆ pInputX

TrackedInput Dragengine.Scenery.ECBehaviorVRHandLocomotion.Instance.pInputX

◆ pListeners

Array Dragengine.Scenery.ECBehaviorVRHandLocomotion.Instance.pListeners

◆ pOriginMatrix

Matrix Dragengine.Scenery.ECBehaviorVRHandLocomotion.Instance.pOriginMatrix

◆ pPlayerControllable

ECBehaviorPlayerControllable.Instance Dragengine.Scenery.ECBehaviorVRHandLocomotion.Instance.pPlayerControllable

◆ pRange

float Dragengine.Scenery.ECBehaviorVRHandLocomotion.Instance.pRange

◆ pVRHand

ECBehaviorVRHand.Instance Dragengine.Scenery.ECBehaviorVRHandLocomotion.Instance.pVRHand

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