|
Drag[en]gine Script Module DragonScript 1.32.1
|
Behavior instance. More...
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. | |
Behavior instance.
| void Dragengine.Scenery.ECBehaviorVRHandLocomotion.Instance.addListener | ( | Listener | listener | ) |
Add listener.
|
protected |
Calculate linearity factor.
| void Dragengine.Scenery.ECBehaviorVRHandLocomotion.Instance.clearCommands | ( | ) |
Set all axis command to null.
| void Dragengine.Scenery.ECBehaviorVRHandLocomotion.Instance.dispose | ( | ) |
Dispose of instance.
Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.
| float Dragengine.Scenery.ECBehaviorVRHandLocomotion.Instance.getDeadzone | ( | ) |
Deadzone as percentage of range (0..1).
| ECBehaviorVRHandLocomotion Dragengine.Scenery.ECBehaviorVRHandLocomotion.Instance.getECBehavior | ( | ) |
Behavior.
| bool Dragengine.Scenery.ECBehaviorVRHandLocomotion.Instance.getEnabled | ( | ) |
Enabled.
| TrackedInput Dragengine.Scenery.ECBehaviorVRHandLocomotion.Instance.getInputY | ( | ) |
Y axis input.
| TrackedInput Dragengine.Scenery.ECBehaviorVRHandLocomotion.Instance.getInputZ | ( | ) |
Z axis input.
| 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) |
| float Dragengine.Scenery.ECBehaviorVRHandLocomotion.Instance.getRange | ( | ) |
Input range in meters.
| ECBehaviorVRHand.Instance Dragengine.Scenery.ECBehaviorVRHandLocomotion.Instance.getVRHand | ( | ) |
VR Hand.
| void Dragengine.Scenery.ECBehaviorVRHandLocomotion.Instance.init | ( | StubElement | stub | ) |
Initialize behavior from stub.
Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.
| bool Dragengine.Scenery.ECBehaviorVRHandLocomotion.Instance.isRunning | ( | ) |
Locomotion is running.
| float Dragengine.Scenery.ECBehaviorVRHandLocomotion.Instance.mapInputValue | ( | float | input | ) |
Calculated mapped input value in the range -1..1 .
| Instance Dragengine.Scenery.ECBehaviorVRHandLocomotion.Instance.new | ( | ECBehaviorVRHandLocomotion | ecbehavior, |
| BehaviorElement | element | ||
| ) |
Create instance.
| void Dragengine.Scenery.ECBehaviorVRHandLocomotion.Instance.removeListener | ( | Listener | listener | ) |
Remove listener.
| void Dragengine.Scenery.ECBehaviorVRHandLocomotion.Instance.setCommandsMove | ( | ) |
Set MoveLR as X axis command, MoveFB as Z axis command, and null as Y axis command.
| void Dragengine.Scenery.ECBehaviorVRHandLocomotion.Instance.setCommandsTurn | ( | ) |
Set LookLR as X axis command and null as Y and Z axis command.
| void Dragengine.Scenery.ECBehaviorVRHandLocomotion.Instance.setCommandsTurnMove | ( | ) |
Set LookLR as X axis command and MoveFB as Z axis command, and null as Y axis command.
| void Dragengine.Scenery.ECBehaviorVRHandLocomotion.Instance.setDeadzone | ( | float | deadzone | ) |
Set deadzone as percentage of range (0..1).
| void Dragengine.Scenery.ECBehaviorVRHandLocomotion.Instance.setEnabled | ( | bool | enabled | ) |
Set enabled.
| void Dragengine.Scenery.ECBehaviorVRHandLocomotion.Instance.setLinearity | ( | float | linearity | ) |
Set linearity of input.
| void Dragengine.Scenery.ECBehaviorVRHandLocomotion.Instance.setRange | ( | float | range | ) |
Set input range in meters.
| void Dragengine.Scenery.ECBehaviorVRHandLocomotion.Instance.start | ( | ) |
Start locomotion.
Has no effect if disabled, hand is not using hand interaction or already tracking.
| void Dragengine.Scenery.ECBehaviorVRHandLocomotion.Instance.think | ( | float | elapsed | ) |
Frame update.
Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.
| void Dragengine.Scenery.ECBehaviorVRHandLocomotion.Instance.update | ( | float | elapsed | ) |
Update input tracking.
| ECComposeBTSM.Instance Dragengine.Scenery.ECBehaviorVRHandLocomotion.Instance.pBTSMs |
| ECBehaviorVRHandLocomotion Dragengine.Scenery.ECBehaviorVRHandLocomotion.Instance.pECBehavior |
| bool Dragengine.Scenery.ECBehaviorVRHandLocomotion.Instance.pEnabled |
| Vector Dragengine.Scenery.ECBehaviorVRHandLocomotion.Instance.pInputPosition |
| TrackedInput Dragengine.Scenery.ECBehaviorVRHandLocomotion.Instance.pInputX |
| Array Dragengine.Scenery.ECBehaviorVRHandLocomotion.Instance.pListeners |
| Matrix Dragengine.Scenery.ECBehaviorVRHandLocomotion.Instance.pOriginMatrix |
| ECBehaviorPlayerControllable.Instance Dragengine.Scenery.ECBehaviorVRHandLocomotion.Instance.pPlayerControllable |
| float Dragengine.Scenery.ECBehaviorVRHandLocomotion.Instance.pRange |
| ECBehaviorVRHand.Instance Dragengine.Scenery.ECBehaviorVRHandLocomotion.Instance.pVRHand |