|
Drag[en]gine Script Module DragonScript 1.35
|
Base actor action for VR first person type actors. More...
Classes | |
| class | Factory |
| Factory for loading actor actions. More... | |
Public Member Functions | |
| void | analogLookUD (float amount, bool sticky) |
| Analog looking up/down. | |
| void | crouchStart () |
| Start crouching. | |
| void | crouchStop () |
| Stop crouching. | |
| void | crouchToggle () |
| Toggle crouching. | |
| ECBehaviorPlayerInputTurn.Instance | getPlayerInputTurn () |
| Player input turning. | |
| ECBehaviorVRBody.Instance | getVRBody () |
| VR Body. | |
| ECBehaviorVRHMD.Instance | getVRHMD () |
| VR HMD. | |
| ECBehaviorVRHand.Instance | getVRLeftHand () |
| VR Left Hand Controller. | |
| ECBehaviorAttachSlot.Instance | getVRLeftHandAttachSlot () |
| VR Left Hand Controller Attach Slot. | |
| ECBehaviorGrabber.Instance | getVRLeftHandGrabber () |
| VR Left Hand Controller Grabber. | |
| ECBehaviorVRHandLaserPointer.Instance | getVRLeftHandLaserPointer () |
| VR Left Hand Controller Laser Pointer. | |
| ECBehaviorVRHandPointAt.Instance | getVRLeftHandPointAt () |
| VR Left Hand Controller Point-At. | |
| ECBehaviorVRPlayspace.Instance | getVRPlayspace () |
| VR Playspace. | |
| ECBehaviorVRHand.Instance | getVRRightHand () |
| VR Right Hand Controller. | |
| ECBehaviorAttachSlot.Instance | getVRRightHandAttachSlot () |
| VR Right Hand Controller Attach Slot. | |
| ECBehaviorGrabber.Instance | getVRRightHandGrabber () |
| VR Right Hand Controller Grabber. | |
| ECBehaviorVRHandLaserPointer.Instance | getVRRightHandLaserPointer () |
| VR Right Hand Controller Laser Pointer. | |
| ECBehaviorVRHandPointAt.Instance | getVRRightHandPointAt () |
| VR Right Hand Controller Point-At. | |
| void | lookDownStart () |
| Start looking down. | |
| void | lookDownStop () |
| Stop looking down. | |
| void | lookUpStart () |
| Start looking up. | |
| void | lookUpStop () |
| Stop looking up. | |
| BAAFirstPersonVR | new () |
| Create actor action. | |
| String | persistencyFactoryName () |
| Name of PersistencyFactory required to load object from file. | |
| Public Member Functions inherited from Dragengine.Scenery.BAAFirstPerson | |
| void | activate (BehaviorElement actor) |
| Action has been set as active action in an actor. | |
| void | analogLookLR (float amount, bool sticky) |
| Analog looking left/right. | |
| void | analogMoveFB (float amount, bool sticky) |
| Analog moving forward/backward. | |
| void | analogMoveLR (float amount, bool sticky) |
| Analog moving left/right. | |
| bool | canHitCollider (Collider owner, Collider collider) |
| Two colliders can hit each other. | |
| void | colliderChanged (Collider owner) |
| Collider changed. | |
| void | collisionResponse (Collider owner, CollisionInfo info) |
| Collision detected. | |
| ECBehaviorActorMover.Instance | getActorMover () |
| Actor mover behavior. | |
| ECBehaviorColliderAI.Instance | getColliderAI () |
| Collider AI behavior. | |
| ECBehaviorFootSteps.Instance | getFootSteps () |
| Foot steps behavior. | |
| float | getLandingAngle () |
| Angle in degrees between falling direction and ground normal to land. | |
| ECBehaviorPlayerInputCrouch.Instance | getPlayerInputCrouch () |
| Player input crouching behavior. | |
| ECBehaviorPlayerInputLook.Instance | getPlayerInputLook () |
| Player input looking around behavior. | |
| ECBehaviorPlayerInputMove.Instance | getPlayerInputMove () |
| Player input moving behavior. | |
| ECBehaviorProjectToGround.Instance | getProjectToGround () |
| Project to ground behavior. | |
| void | lookLeftStart () |
| Start looking left. | |
| void | lookLeftStop () |
| Stop looking left. | |
| void | lookRightStart () |
| Start looking right. | |
| void | lookRightStop () |
| Stop looking right. | |
| void | moveBackwardStart () |
| Start moving backward. | |
| void | moveBackwardStop () |
| Stop moving backward. | |
| void | moveForwardStart () |
| Start moving forward. | |
| void | moveForwardStop () |
| Stop moving forward. | |
| void | moveLeftStart () |
| Start moving left. | |
| void | moveLeftStop () |
| Stop moving left. | |
| void | moveRightStart () |
| Start moving right. | |
| void | moveRightStop () |
| Stop moving right. | |
| void | playerReleasesControl () |
| Player released control of actor. | |
| void | playerTakesControl () |
| Player takes control of actor. | |
| void | playerThink (float elapsed) |
| Thinking for player controlled actor only. | |
| void | postThink (float elapsed) |
| Post physics. | |
| void | runStart () |
| Start running. | |
| void | runStop () |
| Stop running. | |
| void | runToggle () |
| Toggle running. | |
| void | setLandingAngle (float angle) |
| Set angle in degrees between falling direction and ground normal to land. | |
| void | think (float elapsed) |
| Thinking. | |
| Public Member Functions inherited from Dragengine.Scenery.BaseActorAction | |
| void | activateWhileLoading (BehaviorElement actor) |
| Action has been set as active action in an actor while loading. | |
| void | aiFailed () |
| Notify actor AI this action failed. | |
| void | aiFinished () |
| Notify actor AI this action failed. | |
| void | cancel () |
| Cancel action the next time possible. | |
| bool | conversationWait () |
| Check if conversation actions have to wait for actor to finish this action. | |
| void | deactivate () |
| Action has been unset as active action in an actor. | |
| void | dispose () |
| Dispose of actor action. | |
| void | enteredGameWorld () |
| Actor entered game world. | |
| void | enterFrame () |
| Actor has been added to game world and enterFrame() is called once. | |
| BehaviorElement | getActor () |
| Actor the action is assigned to or null. | |
| ECBehaviorActorAnimated.Instance | getActorAnimated () |
| Actor animated behavior if present. | |
| ECBehaviorActorAIAction.Instance | getAIAction () |
| Behavior actor ai-action or null. | |
| ECBehaviorConversationActor.Instance | getConversationActor () |
| Conversation actor behavior if present. | |
| ECBehaviorLocomotion.Instance | getLocomotion () |
| Locomotion behavior. | |
| ECBehaviorPlayerControllable.Instance | getPlayerControllable () |
| Behavior player controllable or null. | |
| bool | isActive () |
| Action is active actor action. | |
| bool | isControlledByPlayer () |
| Actor is controlled by player. | |
| bool | isNotActive () |
| Action is not active actor action. | |
| void | leftGameWorld () |
| Actor left game world. | |
| void | log (Console console, Element element, String text) |
| Log text about element to console prefixed with actor information. | |
| void | log (Console console, Exception exception) |
| Log exception to console prefixed with actor information. | |
| void | log (Console console, String text) |
| Log text to console prefixed with actor information. | |
| void | log (Element element, String text) |
| Log text about element to BaseGameApp console prefixed with actor information. | |
| void | log (Exception exception) |
| Log exception to BaseGameApp console prefixed with actor information. | |
| void | log (String text) |
| Log text to BaseGameApp console prefixed with actor information. | |
| String | loggingPrefix () |
| Logging prefix. | |
| BaseActorAction | new (PersistencyEnvironment env, FileReader reader) |
| Create actor action from persisted state. | |
| void | playerPostThink (float elapsed) |
| Post physics for player controlled actor only. | |
| void | writeObjectToFile (PersistencyEnvironment env, FileWriter writer) |
| Write object to file writer. | |
Protected Member Functions | |
| void | initBehaviors () |
| Init behaviors. | |
| void | initLocomotion () |
| Initialize locomotion. | |
| void | initLocomotionPlayer () |
| Initialize locomotion if player controls this actor. | |
| void | initPlayerInput () |
| void | playerUpdateLocomotion (float elapsed) |
| Update locomotion. | |
| Protected Member Functions inherited from Dragengine.Scenery.BAAFirstPerson | |
| void | applyLookAroundChanges (float deltaHorizontal, float deltaVertical) |
| Apply looking around changes. | |
| bool | doesActorLand (Collider owner, CollisionInfo info) |
| Free falling actor is landing. | |
| void | doTurnLook (float elapsed) |
| Apply turning and looking around. | |
| void | updateAICollider (float elapsed) |
| Update collider. | |
| void | updateLocomotion (float elapsed) |
| Update locomotion. | |
| void | updateLocomotionPost (float elapsed) |
| Post-Update locomotion. | |
| Protected Member Functions inherited from Dragengine.Scenery.BaseActorAction | |
| void | applyAnimations () |
| Apply animations. | |
| void | initAnimator () |
| Initialize animator. | |
| void | updateAnimator (float elapsed) |
| Update animator controllers. | |
Additional Inherited Members | |
| Public Attributes inherited from Dragengine.Scenery.BAAFirstPerson | |
| float | pLandingAngle |
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.
| void Dragengine.Scenery.BAAFirstPersonVR.analogLookUD | ( | float | amount, |
| bool | sticky ) |
Analog looking up/down.
Reimplemented from Dragengine.Scenery.BAAFirstPerson.
References getVRLeftHandAttachSlot(), and vrLeftHandAttachSlot.
Referenced by initLocomotion().
| void Dragengine.Scenery.BAAFirstPersonVR.crouchStart | ( | ) |
Start crouching.
Reimplemented from Dragengine.Scenery.BAAFirstPerson.
Referenced by initLocomotion().
| void Dragengine.Scenery.BAAFirstPersonVR.crouchStop | ( | ) |
Stop crouching.
Reimplemented from Dragengine.Scenery.BAAFirstPerson.
References getVRRightHandGrabber(), and vrRightHandGrabber.
Referenced by initLocomotionPlayer().
| void Dragengine.Scenery.BAAFirstPersonVR.crouchToggle | ( | ) |
Toggle crouching.
Reimplemented from Dragengine.Scenery.BAAFirstPerson.
References getVRLeftHandGrabber(), and vrLeftHandGrabber.
Referenced by initLocomotionPlayer().
| ECBehaviorPlayerInputTurn.Instance Dragengine.Scenery.BAAFirstPersonVR.getPlayerInputTurn | ( | ) |
| ECBehaviorVRBody.Instance Dragengine.Scenery.BAAFirstPersonVR.getVRBody | ( | ) |
VR Body.
References getVRPlayspace(), and vrPlayspace.
Referenced by getVRRightHandPointAt(), and persistencyFactoryName().
| ECBehaviorVRHMD.Instance Dragengine.Scenery.BAAFirstPersonVR.getVRHMD | ( | ) |
VR HMD.
References getPlayerInputTurn(), and playerInputTurn.
Referenced by getVRLeftHand(), and persistencyFactoryName().
| ECBehaviorVRHand.Instance Dragengine.Scenery.BAAFirstPersonVR.getVRLeftHand | ( | ) |
VR Left Hand Controller.
References getVRHMD(), and vrHMD.
Referenced by getVRRightHandLaserPointer(), and persistencyFactoryName().
| ECBehaviorAttachSlot.Instance Dragengine.Scenery.BAAFirstPersonVR.getVRLeftHandAttachSlot | ( | ) |
VR Left Hand Controller Attach Slot.
Referenced by analogLookUD(), and persistencyFactoryName().
| ECBehaviorGrabber.Instance Dragengine.Scenery.BAAFirstPersonVR.getVRLeftHandGrabber | ( | ) |
VR Left Hand Controller Grabber.
References getVRLeftHandLaserPointer(), and vrLeftHandLaserPointer.
Referenced by crouchToggle(), and persistencyFactoryName().
| ECBehaviorVRHandLaserPointer.Instance Dragengine.Scenery.BAAFirstPersonVR.getVRLeftHandLaserPointer | ( | ) |
VR Left Hand Controller Laser Pointer.
References getVRRightHandPointAt(), and vrRightHandPointAt.
Referenced by getVRLeftHandGrabber(), and persistencyFactoryName().
| ECBehaviorVRHandPointAt.Instance Dragengine.Scenery.BAAFirstPersonVR.getVRLeftHandPointAt | ( | ) |
VR Left Hand Controller Point-At.
References getVRRightHand(), and vrRightHand.
Referenced by getVRRightHandAttachSlot(), and persistencyFactoryName().
| ECBehaviorVRPlayspace.Instance Dragengine.Scenery.BAAFirstPersonVR.getVRPlayspace | ( | ) |
VR Playspace.
Referenced by getVRBody(), and persistencyFactoryName().
| ECBehaviorVRHand.Instance Dragengine.Scenery.BAAFirstPersonVR.getVRRightHand | ( | ) |
VR Right Hand Controller.
Referenced by getVRLeftHandPointAt(), and persistencyFactoryName().
| ECBehaviorAttachSlot.Instance Dragengine.Scenery.BAAFirstPersonVR.getVRRightHandAttachSlot | ( | ) |
VR Right Hand Controller Attach Slot.
References getVRLeftHandPointAt(), and vrLeftHandPointAt.
Referenced by lookUpStop(), and persistencyFactoryName().
| ECBehaviorGrabber.Instance Dragengine.Scenery.BAAFirstPersonVR.getVRRightHandGrabber | ( | ) |
VR Right Hand Controller Grabber.
References getVRRightHandLaserPointer(), and vrRightHandLaserPointer.
Referenced by crouchStop(), and persistencyFactoryName().
| ECBehaviorVRHandLaserPointer.Instance Dragengine.Scenery.BAAFirstPersonVR.getVRRightHandLaserPointer | ( | ) |
VR Right Hand Controller Laser Pointer.
References getVRLeftHand(), and vrLeftHand.
Referenced by getVRRightHandGrabber(), and persistencyFactoryName().
| ECBehaviorVRHandPointAt.Instance Dragengine.Scenery.BAAFirstPersonVR.getVRRightHandPointAt | ( | ) |
VR Right Hand Controller Point-At.
References getVRBody(), and vrBody.
Referenced by getVRLeftHandLaserPointer(), and persistencyFactoryName().
|
protected |
Init behaviors.
Retrieve and store required and optional behavior instances from the actor element.
Reimplemented from Dragengine.Scenery.BAAFirstPerson.
References lookUpStart().
Referenced by playerUpdateLocomotion().
|
protected |
Initialize locomotion.
See ECBehaviorLocomotion.initHuman().
Reimplemented from Dragengine.Scenery.BAAFirstPerson.
References analogLookUD(), crouchStart(), lookDownStart(), and lookDownStop().
Referenced by persistencyFactoryName().
|
protected |
Initialize locomotion if player controls this actor.
Applies these changes to parameters:
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.
References crouchStop(), and crouchToggle().
Referenced by persistencyFactoryName().
|
protected |
Init player input.
Reimplemented from Dragengine.Scenery.BAAFirstPerson.
References lookUpStop().
Referenced by persistencyFactoryName().
| void Dragengine.Scenery.BAAFirstPersonVR.lookDownStart | ( | ) |
Start looking down.
Reimplemented from Dragengine.Scenery.BAAFirstPerson.
References vrRightHandAttachSlot.
Referenced by initLocomotion().
| void Dragengine.Scenery.BAAFirstPersonVR.lookDownStop | ( | ) |
Stop looking down.
Reimplemented from Dragengine.Scenery.BAAFirstPerson.
Referenced by initLocomotion().
| void Dragengine.Scenery.BAAFirstPersonVR.lookUpStart | ( | ) |
Start looking up.
Reimplemented from Dragengine.Scenery.BAAFirstPerson.
Referenced by initBehaviors().
| void Dragengine.Scenery.BAAFirstPersonVR.lookUpStop | ( | ) |
Stop looking up.
Reimplemented from Dragengine.Scenery.BAAFirstPerson.
References getVRRightHandAttachSlot().
Referenced by initPlayerInput().
| BAAFirstPersonVR Dragengine.Scenery.BAAFirstPersonVR.new | ( | ) |
Create actor action.
Reimplemented from Dragengine.Scenery.BAAFirstPerson.
References vrLeftHandGrabber.
Referenced by getPlayerInputTurn().
| 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.
References Dragengine.Scenery.BaseActorAction.actor, Dragengine.Scenery.BAAFirstPerson.actorMover, Dragengine.Scenery.BaseActorAction.getLocomotion(), getVRBody(), getVRHMD(), getVRLeftHand(), getVRLeftHandAttachSlot(), getVRLeftHandGrabber(), getVRLeftHandLaserPointer(), getVRLeftHandPointAt(), getVRPlayspace(), getVRRightHand(), getVRRightHandAttachSlot(), getVRRightHandGrabber(), getVRRightHandLaserPointer(), getVRRightHandPointAt(), initLocomotion(), initLocomotionPlayer(), initPlayerInput(), Dragengine.Scenery.BaseActorAction.locomotion, persistencyFactoryName(), Dragengine.Scenery.BAAFirstPerson.playerInputCrouch, Dragengine.Scenery.BAAFirstPerson.playerInputMove, playerInputTurn, playerUpdateLocomotion(), Dragengine.Scenery.BAAFirstPerson.updateLocomotion(), vrBody, vrHMD, vrLeftHand, vrLeftHandAttachSlot, vrLeftHandGrabber, vrLeftHandLaserPointer, vrLeftHandPointAt, vrPlayspace, vrRightHand, vrRightHandAttachSlot, vrRightHandGrabber, vrRightHandLaserPointer, and vrRightHandPointAt.
Referenced by persistencyFactoryName().
|
protected |
Update locomotion.
In addition to super class implementation force body orientation.
Reimplemented from Dragengine.Scenery.BAAFirstPerson.
References Dragengine.Scenery.BaseActorAction.actor, getPlayerInputTurn(), initBehaviors(), and playerInputTurn.
Referenced by persistencyFactoryName().
|
protected |
Player input turning behavior.
Referenced by getVRHMD(), persistencyFactoryName(), and playerUpdateLocomotion().
|
protected |
VR Body behavior.
Referenced by getVRRightHandPointAt(), and persistencyFactoryName().
|
protected |
VR HMD behavior.
Referenced by getVRLeftHand(), and persistencyFactoryName().
|
protected |
VR Left Hand Controller behavior.
Referenced by getVRRightHandLaserPointer(), and persistencyFactoryName().
|
protected |
VR Left Hand Controller Attach Slot behavior.
Referenced by analogLookUD(), and persistencyFactoryName().
|
protected |
VR Left Hand Controller Grabber behavior.
Referenced by crouchToggle(), new(), and persistencyFactoryName().
|
protected |
VR Left Hand Controller Laser Pointer behavior.
Referenced by getVRLeftHandGrabber(), and persistencyFactoryName().
|
protected |
VR Left Hand Controller Point-At behavior.
Referenced by getVRRightHandAttachSlot(), and persistencyFactoryName().
|
protected |
VR Playspace behavior.
Referenced by getVRBody(), and persistencyFactoryName().
|
protected |
VR Right Hand Controller behavior.
Referenced by getVRLeftHandPointAt(), and persistencyFactoryName().
|
protected |
VR Right Hand Controller Attach Slot behavior.
Referenced by lookDownStart(), and persistencyFactoryName().
|
protected |
VR Right Hand Controller Grabber behavior.
Referenced by crouchStop(), and persistencyFactoryName().
|
protected |
VR Right Hand Controller Laser Pointer behavior.
Referenced by getVRRightHandGrabber(), and persistencyFactoryName().
|
protected |
VR Right Hand Controller Point-At behavior.
Referenced by getVRLeftHandLaserPointer(), and persistencyFactoryName().