Drag[en]gine Script Module DragonScript
1.21
|
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. 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 |
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.
void Dragengine.Scenery.BAAFirstPersonVR.crouchStart | ( | ) |
Start crouching.
Reimplemented from Dragengine.Scenery.BAAFirstPerson.
void Dragengine.Scenery.BAAFirstPersonVR.crouchStop | ( | ) |
Stop crouching.
Reimplemented from Dragengine.Scenery.BAAFirstPerson.
void Dragengine.Scenery.BAAFirstPersonVR.crouchToggle | ( | ) |
Toggle crouching.
Reimplemented from Dragengine.Scenery.BAAFirstPerson.
ECBehaviorPlayerInputTurn.Instance Dragengine.Scenery.BAAFirstPersonVR.getPlayerInputTurn | ( | ) |
Player input turning.
ECBehaviorVRHMD.Instance Dragengine.Scenery.BAAFirstPersonVR.getVRHMD | ( | ) |
VR HMD.
ECBehaviorVRHand.Instance Dragengine.Scenery.BAAFirstPersonVR.getVRLeftHand | ( | ) |
VR Left Hand Controller.
ECBehaviorAttachSlot.Instance Dragengine.Scenery.BAAFirstPersonVR.getVRLeftHandAttachSlot | ( | ) |
VR Left Hand Controller Attach Slot.
ECBehaviorGrabber.Instance Dragengine.Scenery.BAAFirstPersonVR.getVRLeftHandGrabber | ( | ) |
VR Left Hand Controller Grabber.
ECBehaviorVRHandLaserPointer.Instance Dragengine.Scenery.BAAFirstPersonVR.getVRLeftHandLaserPointer | ( | ) |
VR Left Hand Controller Laser Pointer.
ECBehaviorVRHandPointAt.Instance Dragengine.Scenery.BAAFirstPersonVR.getVRLeftHandPointAt | ( | ) |
VR Left Hand Controller Point-At.
ECBehaviorVRPlayspace.Instance Dragengine.Scenery.BAAFirstPersonVR.getVRPlayspace | ( | ) |
VR Playspace.
ECBehaviorVRHand.Instance Dragengine.Scenery.BAAFirstPersonVR.getVRRightHand | ( | ) |
VR Right Hand Controller.
ECBehaviorAttachSlot.Instance Dragengine.Scenery.BAAFirstPersonVR.getVRRightHandAttachSlot | ( | ) |
VR Right Hand Controller Attach Slot.
ECBehaviorGrabber.Instance Dragengine.Scenery.BAAFirstPersonVR.getVRRightHandGrabber | ( | ) |
VR Right Hand Controller Grabber.
ECBehaviorVRHandLaserPointer.Instance Dragengine.Scenery.BAAFirstPersonVR.getVRRightHandLaserPointer | ( | ) |
VR Right Hand Controller Laser Pointer.
ECBehaviorVRHandPointAt.Instance Dragengine.Scenery.BAAFirstPersonVR.getVRRightHandPointAt | ( | ) |
VR Right Hand Controller Point-At.
|
protected |
Init behaviors.
Retrieve and store required and optional behavior instances from the actor element.
Reimplemented from Dragengine.Scenery.BAAFirstPerson.
|
protected |
Initialize locomotion.
See ECBehaviorLocomotion.initHuman().
Reimplemented from Dragengine.Scenery.BAAFirstPerson.
|
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.
|
protected |
Init player input.
Reimplemented from Dragengine.Scenery.BAAFirstPerson.
void Dragengine.Scenery.BAAFirstPersonVR.lookDownStart | ( | ) |
Start looking down.
Reimplemented from Dragengine.Scenery.BAAFirstPerson.
void Dragengine.Scenery.BAAFirstPersonVR.lookDownStop | ( | ) |
Stop looking down.
Reimplemented from Dragengine.Scenery.BAAFirstPerson.
void Dragengine.Scenery.BAAFirstPersonVR.lookUpStart | ( | ) |
Start looking up.
Reimplemented from Dragengine.Scenery.BAAFirstPerson.
void Dragengine.Scenery.BAAFirstPersonVR.lookUpStop | ( | ) |
Stop looking up.
Reimplemented from Dragengine.Scenery.BAAFirstPerson.
BAAFirstPersonVR Dragengine.Scenery.BAAFirstPersonVR.new | ( | ) |
Create actor action.
Reimplemented from Dragengine.Scenery.BAAFirstPerson.
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.
|
protected |
Update locomotion.
In addition to super class implementation force body orientation.
Reimplemented from Dragengine.Scenery.BAAFirstPerson.
|
protected |
Player input turning behavior.
|
protected |
VR HMD behavior.
|
protected |
VR Left Hand Controller behavior.
|
protected |
VR Left Hand Controller Attach Slot behavior.
|
protected |
VR Left Hand Controller Grabber behavior.
|
protected |
VR Left Hand Controller Laser Pointer behavior.
|
protected |
VR Left Hand Controller Point-At behavior.
|
protected |
VR Playspace behavior.
|
protected |
VR Right Hand Controller behavior.
|
protected |
VR Right Hand Controller Attach Slot behavior.
|
protected |
VR Right Hand Controller Grabber behavior.
|
protected |
VR Right Hand Controller Laser Pointer behavior.
|
protected |
VR Right Hand Controller Point-At behavior.