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

Base actor action for VR first person type actors. More...

Inheritance diagram for Dragengine.Scenery.BAAFirstPersonVR:
Dragengine.Scenery.BAAFirstPerson Dragengine.Scenery.BaseActorAction Dragengine.Scenery.BAAMovement Dragengine.LoadSave.Persistable

Classes

class  Factory
 Factory for loading actor actions. More...
 

Public Member Functions

void analogLookUD (float amount, bool sticky)
 Analog looking up/down. More...
 
void crouchStart ()
 Start crouching. More...
 
void crouchStop ()
 Stop crouching. More...
 
void crouchToggle ()
 Toggle crouching. More...
 
ECBehaviorPlayerInputTurn.Instance getPlayerInputTurn ()
 Player input turning. More...
 
ECBehaviorVRHMD.Instance getVRHMD ()
 VR HMD. More...
 
ECBehaviorVRHand.Instance getVRLeftHand ()
 VR Left Hand Controller. More...
 
ECBehaviorAttachSlot.Instance getVRLeftHandAttachSlot ()
 VR Left Hand Controller Attach Slot. More...
 
ECBehaviorGrabber.Instance getVRLeftHandGrabber ()
 VR Left Hand Controller Grabber. More...
 
ECBehaviorVRHandLaserPointer.Instance getVRLeftHandLaserPointer ()
 VR Left Hand Controller Laser Pointer. More...
 
ECBehaviorVRHandPointAt.Instance getVRLeftHandPointAt ()
 VR Left Hand Controller Point-At. More...
 
ECBehaviorVRPlayspace.Instance getVRPlayspace ()
 VR Playspace. More...
 
ECBehaviorVRHand.Instance getVRRightHand ()
 VR Right Hand Controller. More...
 
ECBehaviorAttachSlot.Instance getVRRightHandAttachSlot ()
 VR Right Hand Controller Attach Slot. More...
 
ECBehaviorGrabber.Instance getVRRightHandGrabber ()
 VR Right Hand Controller Grabber. More...
 
ECBehaviorVRHandLaserPointer.Instance getVRRightHandLaserPointer ()
 VR Right Hand Controller Laser Pointer. More...
 
ECBehaviorVRHandPointAt.Instance getVRRightHandPointAt ()
 VR Right Hand Controller Point-At. More...
 
void lookDownStart ()
 Start looking down. More...
 
void lookDownStop ()
 Stop looking down. More...
 
void lookUpStart ()
 Start looking up. More...
 
void lookUpStop ()
 Stop looking up. More...
 
BAAFirstPersonVR new ()
 Create actor action. More...
 
String persistencyFactoryName ()
 Name of PersistencyFactory required to load object from file. More...
 
- Public Member Functions inherited from Dragengine.Scenery.BAAFirstPerson
void activate (BehaviorElement actor)
 Action has been set as active action in an actor. More...
 
void analogLookLR (float amount, bool sticky)
 Analog looking left/right. More...
 
void analogMoveFB (float amount, bool sticky)
 Analog moving forward/backward. More...
 
void analogMoveLR (float amount, bool sticky)
 Analog moving left/right. More...
 
bool canHitCollider (Collider owner, Collider collider)
 Two colliders can hit each other. More...
 
void colliderChanged (Collider owner)
 Collider changed. More...
 
void collisionResponse (Collider owner, CollisionInfo info)
 Collision detected. More...
 
ECBehaviorActorMover.Instance getActorMover ()
 Actor mover behavior. More...
 
ECBehaviorColliderAI.Instance getColliderAI ()
 Collider AI behavior. More...
 
ECBehaviorFootSteps.Instance getFootSteps ()
 Foot steps behavior. More...
 
float getLandingAngle ()
 Angle in degrees between falling direction and ground normal to land. More...
 
ECBehaviorPlayerInputCrouch.Instance getPlayerInputCrouch ()
 Player input crouching behavior. More...
 
ECBehaviorPlayerInputLook.Instance getPlayerInputLook ()
 Player input looking around behavior. More...
 
ECBehaviorPlayerInputMove.Instance getPlayerInputMove ()
 Player input moving behavior. More...
 
ECBehaviorProjectToGround.Instance getProjectToGround ()
 Project to ground behavior. More...
 
void lookLeftStart ()
 Start looking left. More...
 
void lookLeftStop ()
 Stop looking left. More...
 
void lookRightStart ()
 Start looking right. More...
 
void lookRightStop ()
 Stop looking right. More...
 
void moveBackwardStart ()
 Start moving backward. More...
 
void moveBackwardStop ()
 Stop moving backward. More...
 
void moveForwardStart ()
 Start moving forward. More...
 
void moveForwardStop ()
 Stop moving forward. More...
 
void moveLeftStart ()
 Start moving left. More...
 
void moveLeftStop ()
 Stop moving left. More...
 
void moveRightStart ()
 Start moving right. More...
 
void moveRightStop ()
 Stop moving right. More...
 
void playerReleasesControl ()
 Player released control of actor. More...
 
void playerTakesControl ()
 Player takes control of actor. More...
 
void playerThink (float elapsed)
 Thinking for player controlled actor only. More...
 
void postThink (float elapsed)
 Post physics. More...
 
void runStart ()
 Start running. More...
 
void runStop ()
 Stop running. More...
 
void runToggle ()
 Toggle running. More...
 
void setLandingAngle (float angle)
 Set angle in degrees between falling direction and ground normal to land. More...
 
void think (float elapsed)
 Thinking. More...
 
- Public Member Functions inherited from Dragengine.Scenery.BaseActorAction
void activateWhileLoading (BehaviorElement actor)
 Action has been set as active action in an actor while loading. More...
 
void aiFailed ()
 Notify actor AI this action failed. More...
 
void aiFinished ()
 Notify actor AI this action failed. More...
 
void cancel ()
 Cancel action the next time possible. More...
 
bool conversationWait ()
 Check if conversation actions have to wait for actor to finish this action. More...
 
void deactivate ()
 Action has been unset as active action in an actor. More...
 
void dispose ()
 Dispose of actor action. More...
 
void enteredGameWorld ()
 Actor entered game world. More...
 
void enterFrame ()
 Actor has been added to game world and enterFrame() is called once. More...
 
BehaviorElement getActor ()
 Actor the action is assigned to or null. More...
 
ECBehaviorActorAnimated.Instance getActorAnimated ()
 Actor animated behavior if present. More...
 
ECBehaviorActorAIAction.Instance getAIAction ()
 Behavior actor ai-action or null. More...
 
ECBehaviorConversationActor.Instance getConversationActor ()
 Conversation actor behavior if present. More...
 
ECBehaviorLocomotion.Instance getLocomotion ()
 Locomotion behavior. More...
 
ECBehaviorPlayerControllable.Instance getPlayerControllable ()
 Behavior player controllable or null. More...
 
bool isActive ()
 Action is active actor action. More...
 
bool isControlledByPlayer ()
 Actor is controlled by player. More...
 
bool isNotActive ()
 Action is not active actor action. More...
 
void leftGameWorld ()
 Actor left game world. More...
 
void log (Console console, Element element, String text)
 Log text about element to console prefixed with actor information. More...
 
void log (Console console, Exception exception)
 Log exception to console prefixed with actor information. More...
 
void log (Console console, String text)
 Log text to console prefixed with actor information. More...
 
void log (Element element, String text)
 Log text about element to BaseGameApp console prefixed with actor information. More...
 
void log (Exception exception)
 Log exception to BaseGameApp console prefixed with actor information. More...
 
void log (String text)
 Log text to BaseGameApp console prefixed with actor information. More...
 
String loggingPrefix ()
 Logging prefix. More...
 
BaseActorAction new (PersistencyEnvironment env, FileReader reader)
 Create actor action from persisted state. More...
 
void playerPostThink (float elapsed)
 Post physics for player controlled actor only. More...
 
void writeObjectToFile (PersistencyEnvironment env, FileWriter writer)
 Write object to file writer. More...
 

Protected Member Functions

void initBehaviors ()
 Init behaviors. More...
 
void initLocomotion ()
 Initialize locomotion. More...
 
void initLocomotionPlayer ()
 Initialize locomotion if player controls this actor. More...
 
void initPlayerInput ()
 
void playerUpdateLocomotion (float elapsed)
 Update locomotion. More...
 
- Protected Member Functions inherited from Dragengine.Scenery.BAAFirstPerson
void applyLookAroundChanges (float deltaHorizontal, float deltaVertical)
 Apply looking around changes. More...
 
bool doesActorLand (Collider owner, CollisionInfo info)
 Free falling actor is landing. More...
 
void doTurnLook (float elapsed)
 Apply turning and looking around. More...
 
void updateAICollider (float elapsed)
 Update collider. More...
 
void updateLocomotion (float elapsed)
 Update locomotion. More...
 
void updateLocomotionPost (float elapsed)
 Post-Update locomotion. More...
 
- Protected Member Functions inherited from Dragengine.Scenery.BaseActorAction
void applyAnimations ()
 Apply animations. More...
 
void initAnimator ()
 Initialize animator. More...
 
void updateAnimator (float elapsed)
 Update animator controllers. More...
 

Protected Attributes

ECBehaviorPlayerInputTurn.Instance playerInputTurn
 Player input turning behavior. More...
 
ECBehaviorVRHMD.Instance vrHMD
 VR HMD behavior. More...
 
ECBehaviorVRHand.Instance vrLeftHand
 VR Left Hand Controller behavior. More...
 
ECBehaviorAttachSlot.Instance vrLeftHandAttachSlot
 VR Left Hand Controller Attach Slot behavior. More...
 
ECBehaviorGrabber.Instance vrLeftHandGrabber
 VR Left Hand Controller Grabber behavior. More...
 
ECBehaviorVRHandLaserPointer.Instance vrLeftHandLaserPointer
 VR Left Hand Controller Laser Pointer behavior. More...
 
ECBehaviorVRHandPointAt.Instance vrLeftHandPointAt
 VR Left Hand Controller Point-At behavior. More...
 
ECBehaviorVRPlayspace.Instance vrPlayspace
 VR Playspace behavior. More...
 
ECBehaviorVRHand.Instance vrRightHand
 VR Right Hand Controller behavior. More...
 
ECBehaviorAttachSlot.Instance vrRightHandAttachSlot
 VR Right Hand Controller Attach Slot behavior. More...
 
ECBehaviorGrabber.Instance vrRightHandGrabber
 VR Right Hand Controller Grabber behavior. More...
 
ECBehaviorVRHandLaserPointer.Instance vrRightHandLaserPointer
 VR Right Hand Controller Laser Pointer behavior. More...
 
ECBehaviorVRHandPointAt.Instance vrRightHandPointAt
 VR Right Hand Controller Point-At behavior. More...
 
- Protected Attributes inherited from Dragengine.Scenery.BAAFirstPerson
ECBehaviorActorMover.Instance actorMover
 Actor mover behavior. More...
 
ECBehaviorColliderAI.Instance colliderAI
 Collider AI Behavior. More...
 
ECBehaviorFootSteps.Instance footSteps
 Foot steps behavior. More...
 
bool moveIfColliderChanged
 Property update actor geometry on collider changed. More...
 
ECBehaviorPlayerInputCrouch.Instance playerInputCrouch
 Player input crouching behavior. More...
 
ECBehaviorPlayerInputLook.Instance playerInputLook
 Player input looking around behavior. More...
 
ECBehaviorPlayerInputMove.Instance playerInputMove
 Player input moving behavior. More...
 
ECBehaviorProjectToGround.Instance projectToGround
 Project to ground behavior. More...
 
- Protected Attributes inherited from Dragengine.Scenery.BaseActorAction
BehaviorElement actor
 Actor the action is assigned to or null. More...
 
ECBehaviorActorAnimated.Instance actorAnimated
 Actor animated behavior if present. More...
 
ECBehaviorActorAIAction.Instance aiAction
 Behavior actor ai-action or null. More...
 
ECBehaviorConversationActor.Instance conversationActor
 Conversation actor behavior if present. More...
 
ECBehaviorLocomotion.Instance locomotion
 Locomotion behavior. More...
 
ECBehaviorPlayerControllable.Instance playerControllable
 Behavior player controllable or null. More...
 

Additional Inherited Members

- Public Attributes inherited from Dragengine.Scenery.BAAFirstPerson
float pLandingAngle
 

Detailed Description

Base actor action for VR first person type actors.

Works similar to BAAFirstPerson but looking around is handled differently since the HMD is dictating the looking direction.

The looking direction is set from the HMD orientation. This allows other actors (NPCs or online players) to see where the player is looking at without needing to examine the HMD orientation and thus without needing to change existing code.

The body orientation is used as reference orientation for the HMD and controllers. The looking around inputs are applied to the orientation directly.

This is a kind of crossing between BAAFirstPerson BAAVehicle.

Member Function Documentation

◆ analogLookUD()

void Dragengine.Scenery.BAAFirstPersonVR.analogLookUD ( float  amount,
bool  sticky 
)

Analog looking up/down.

Reimplemented from Dragengine.Scenery.BAAFirstPerson.

◆ crouchStart()

void Dragengine.Scenery.BAAFirstPersonVR.crouchStart ( )

Start crouching.

Reimplemented from Dragengine.Scenery.BAAFirstPerson.

◆ crouchStop()

void Dragengine.Scenery.BAAFirstPersonVR.crouchStop ( )

Stop crouching.

Reimplemented from Dragengine.Scenery.BAAFirstPerson.

◆ crouchToggle()

void Dragengine.Scenery.BAAFirstPersonVR.crouchToggle ( )

Toggle crouching.

Reimplemented from Dragengine.Scenery.BAAFirstPerson.

◆ getPlayerInputTurn()

ECBehaviorPlayerInputTurn.Instance Dragengine.Scenery.BAAFirstPersonVR.getPlayerInputTurn ( )

Player input turning.

◆ getVRHMD()

ECBehaviorVRHMD.Instance Dragengine.Scenery.BAAFirstPersonVR.getVRHMD ( )

VR HMD.

◆ getVRLeftHand()

ECBehaviorVRHand.Instance Dragengine.Scenery.BAAFirstPersonVR.getVRLeftHand ( )

VR Left Hand Controller.

◆ getVRLeftHandAttachSlot()

ECBehaviorAttachSlot.Instance Dragengine.Scenery.BAAFirstPersonVR.getVRLeftHandAttachSlot ( )

VR Left Hand Controller Attach Slot.

Version
1.9

◆ getVRLeftHandGrabber()

ECBehaviorGrabber.Instance Dragengine.Scenery.BAAFirstPersonVR.getVRLeftHandGrabber ( )

VR Left Hand Controller Grabber.

Version
1.9

◆ getVRLeftHandLaserPointer()

ECBehaviorVRHandLaserPointer.Instance Dragengine.Scenery.BAAFirstPersonVR.getVRLeftHandLaserPointer ( )

VR Left Hand Controller Laser Pointer.

Version
1.7

◆ getVRLeftHandPointAt()

ECBehaviorVRHandPointAt.Instance Dragengine.Scenery.BAAFirstPersonVR.getVRLeftHandPointAt ( )

VR Left Hand Controller Point-At.

Version
1.7

◆ getVRPlayspace()

ECBehaviorVRPlayspace.Instance Dragengine.Scenery.BAAFirstPersonVR.getVRPlayspace ( )

VR Playspace.

◆ getVRRightHand()

ECBehaviorVRHand.Instance Dragengine.Scenery.BAAFirstPersonVR.getVRRightHand ( )

VR Right Hand Controller.

◆ getVRRightHandAttachSlot()

ECBehaviorAttachSlot.Instance Dragengine.Scenery.BAAFirstPersonVR.getVRRightHandAttachSlot ( )

VR Right Hand Controller Attach Slot.

Version
1.9

◆ getVRRightHandGrabber()

ECBehaviorGrabber.Instance Dragengine.Scenery.BAAFirstPersonVR.getVRRightHandGrabber ( )

VR Right Hand Controller Grabber.

Version
1.9

◆ getVRRightHandLaserPointer()

ECBehaviorVRHandLaserPointer.Instance Dragengine.Scenery.BAAFirstPersonVR.getVRRightHandLaserPointer ( )

VR Right Hand Controller Laser Pointer.

Version
1.7

◆ getVRRightHandPointAt()

ECBehaviorVRHandPointAt.Instance Dragengine.Scenery.BAAFirstPersonVR.getVRRightHandPointAt ( )

VR Right Hand Controller Point-At.

◆ initBehaviors()

void Dragengine.Scenery.BAAFirstPersonVR.initBehaviors ( )
protected

Init behaviors.

Retrieve and store required and optional behavior instances from the actor element.

Reimplemented from Dragengine.Scenery.BAAFirstPerson.

◆ initLocomotion()

void Dragengine.Scenery.BAAFirstPersonVR.initLocomotion ( )
protected

Initialize locomotion.

See ECBehaviorLocomotion.initHuman().

Reimplemented from Dragengine.Scenery.BAAFirstPerson.

◆ initLocomotionPlayer()

void Dragengine.Scenery.BAAFirstPersonVR.initLocomotionPlayer ( )
protected

Initialize locomotion if player controls this actor.

Applies these changes to parameters:

  • Looking adjust times: 0
  • Orientation adjust times: 1
  • Linear velocity adjust time: 1

The orientation adjust time is important. Too small value cause abrupt changes of angular velocity which can lead to vertigo on the player. Larger values create smoother angular velocity changes which are easier to sustain.

The same applies to linear velocity adjustment time.

Reimplemented from Dragengine.Scenery.BAAFirstPerson.

◆ initPlayerInput()

void Dragengine.Scenery.BAAFirstPersonVR.initPlayerInput ( )
protected

Init player input.

Reimplemented from Dragengine.Scenery.BAAFirstPerson.

◆ lookDownStart()

void Dragengine.Scenery.BAAFirstPersonVR.lookDownStart ( )

Start looking down.

Reimplemented from Dragengine.Scenery.BAAFirstPerson.

◆ lookDownStop()

void Dragengine.Scenery.BAAFirstPersonVR.lookDownStop ( )

Stop looking down.

Reimplemented from Dragengine.Scenery.BAAFirstPerson.

◆ lookUpStart()

void Dragengine.Scenery.BAAFirstPersonVR.lookUpStart ( )

Start looking up.

Reimplemented from Dragengine.Scenery.BAAFirstPerson.

◆ lookUpStop()

void Dragengine.Scenery.BAAFirstPersonVR.lookUpStop ( )

Stop looking up.

Reimplemented from Dragengine.Scenery.BAAFirstPerson.

◆ new()

BAAFirstPersonVR Dragengine.Scenery.BAAFirstPersonVR.new ( )

Create actor action.

Reimplemented from Dragengine.Scenery.BAAFirstPerson.

◆ persistencyFactoryName()

String Dragengine.Scenery.BAAFirstPersonVR.persistencyFactoryName ( )

Name of PersistencyFactory required to load object from file.

Name of PersistencyFactory is first written to the file as string with 8-bit length. Then writeToFile() is called to write the object itself. Empty name is not allowed as is names longer than 255 characters. Name has to match a PersistencyFactory present in the Persistency instance used for loading objects. Object is read using PersistencyFactory.readObjectFromFile() of the matching PersistencyFactory.

Reimplemented from Dragengine.Scenery.BAAFirstPerson.

◆ playerUpdateLocomotion()

void Dragengine.Scenery.BAAFirstPersonVR.playerUpdateLocomotion ( float  elapsed)
protected

Update locomotion.

In addition to super class implementation force body orientation.

Reimplemented from Dragengine.Scenery.BAAFirstPerson.

Member Data Documentation

◆ playerInputTurn

ECBehaviorPlayerInputTurn.Instance Dragengine.Scenery.BAAFirstPersonVR.playerInputTurn
protected

Player input turning behavior.

◆ vrHMD

ECBehaviorVRHMD.Instance Dragengine.Scenery.BAAFirstPersonVR.vrHMD
protected

VR HMD behavior.

◆ vrLeftHand

ECBehaviorVRHand.Instance Dragengine.Scenery.BAAFirstPersonVR.vrLeftHand
protected

VR Left Hand Controller behavior.

◆ vrLeftHandAttachSlot

ECBehaviorAttachSlot.Instance Dragengine.Scenery.BAAFirstPersonVR.vrLeftHandAttachSlot
protected

VR Left Hand Controller Attach Slot behavior.

Version
1.9

◆ vrLeftHandGrabber

ECBehaviorGrabber.Instance Dragengine.Scenery.BAAFirstPersonVR.vrLeftHandGrabber
protected

VR Left Hand Controller Grabber behavior.

Version
1.9

◆ vrLeftHandLaserPointer

ECBehaviorVRHandLaserPointer.Instance Dragengine.Scenery.BAAFirstPersonVR.vrLeftHandLaserPointer
protected

VR Left Hand Controller Laser Pointer behavior.

Version
1.7

◆ vrLeftHandPointAt

ECBehaviorVRHandPointAt.Instance Dragengine.Scenery.BAAFirstPersonVR.vrLeftHandPointAt
protected

VR Left Hand Controller Point-At behavior.

Version
1.7

◆ vrPlayspace

ECBehaviorVRPlayspace.Instance Dragengine.Scenery.BAAFirstPersonVR.vrPlayspace
protected

VR Playspace behavior.

◆ vrRightHand

ECBehaviorVRHand.Instance Dragengine.Scenery.BAAFirstPersonVR.vrRightHand
protected

VR Right Hand Controller behavior.

◆ vrRightHandAttachSlot

ECBehaviorAttachSlot.Instance Dragengine.Scenery.BAAFirstPersonVR.vrRightHandAttachSlot
protected

VR Right Hand Controller Attach Slot behavior.

Version
1.9

◆ vrRightHandGrabber

ECBehaviorGrabber.Instance Dragengine.Scenery.BAAFirstPersonVR.vrRightHandGrabber
protected

VR Right Hand Controller Grabber behavior.

Version
1.9

◆ vrRightHandLaserPointer

ECBehaviorVRHandLaserPointer.Instance Dragengine.Scenery.BAAFirstPersonVR.vrRightHandLaserPointer
protected

VR Right Hand Controller Laser Pointer behavior.

Version
1.7

◆ vrRightHandPointAt

ECBehaviorVRHandPointAt.Instance Dragengine.Scenery.BAAFirstPersonVR.vrRightHandPointAt
protected

VR Right Hand Controller Point-At behavior.

Version
1.7

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