Drag[en]gine Script Module DragonScript 1.35
Loading...
Searching...
No Matches
Dragengine.Scenery.BAAFirstPerson Class Reference

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

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

Classes

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

Public Member Functions

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 analogLookUD (float amount, bool sticky)
 Analog looking up/down.
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.
void crouchStart ()
 Start crouching.
void crouchStop ()
 Stop crouching.
void crouchToggle ()
 Toggle crouching.
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 lookDownStart ()
 Start looking down.
void lookDownStop ()
 Stop looking down.
void lookLeftStart ()
 Start looking left.
void lookLeftStop ()
 Stop looking left.
void lookRightStart ()
 Start looking right.
void lookRightStop ()
 Stop looking right.
void lookUpStart ()
 Start looking up.
void lookUpStop ()
 Stop looking up.
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.
BAAFirstPerson new ()
 Create actor action.
String persistencyFactoryName ()
 Name of PersistencyFactory required to load object from file.
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.

Public Attributes

float pLandingAngle

Protected Member Functions

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 initBehaviors ()
 Init behaviors.
void initLocomotion ()
 Initialize locomotion.
void initLocomotionPlayer ()
 Initialize locomotion if player controls this actor.
void initPlayerInput ()
 Initialize player input tracker.
void playerUpdateLocomotion (float elapsed)
 Update locomotion.
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.

Protected Attributes

ECBehaviorActorMover.Instance actorMover
 Actor mover behavior.
ECBehaviorColliderAI.Instance colliderAI
 Collider AI Behavior.
ECBehaviorFootSteps.Instance footSteps
 Foot steps behavior.
bool moveIfColliderChanged
 Property update actor geometry on collider changed.
ECBehaviorPlayerInputCrouch.Instance playerInputCrouch
 Player input crouching behavior.
ECBehaviorPlayerInputLook.Instance playerInputLook
 Player input looking around behavior.
ECBehaviorPlayerInputMove.Instance playerInputMove
 Player input moving behavior.
ECBehaviorProjectToGround.Instance projectToGround
 Project to ground behavior.
Protected Attributes inherited from Dragengine.Scenery.BaseActorAction
BehaviorElement actor
 Actor the action is assigned to or null.
ECBehaviorActorAnimated.Instance actorAnimated
 Actor animated behavior if present.
ECBehaviorActorAIAction.Instance aiAction
 Behavior actor ai-action or null.
ECBehaviorConversationActor.Instance conversationActor
 Conversation actor behavior if present.
ECBehaviorLocomotion.Instance locomotion
 Locomotion behavior.
ECBehaviorPlayerControllable.Instance playerControllable
 Behavior player controllable or null.

Detailed Description

Base actor action for first person type actors.

This class adds movement support to the basic actor action. The movement can be manipulated by the player through input bindings. The supported movement is similar to first person oriented actor control with 8-way movement and looking around. This serves as a basis for adding interaction support ontop of movement support.

All binding called methods store the activated state in the PlayerInput* assigned to the actor. This allows both AI and bindings to control the actor movement with one code.

The move* methods are activated by pressing keys or buttons. They move the actor into one of 8 possible directions in 45 degree steps around the actor.

The look* methods are activated by pressing keys or buttons. They adjust the looking direction of the actor. Depending on the settings of the player input tracker and locomotion assigned to the actor the looking around of the actor is applied to the actor orientation.

The analog* methods are activated by moving mouse or gamepad axes. They are the analog counterpart of the respective move* or look* methods discussed above.

All move*, look* and analog* methods modify only the PlayerInput assigned to the actor. During think() the desired input is applied to the Locomotion assigned to the actor. The result is then applied to the actor as the movement for this frame update.

This class provides sliding collision handling. This kind of collision handling works well in various situations.

Member Function Documentation

◆ activate()

void Dragengine.Scenery.BAAFirstPerson.activate ( BehaviorElement actor)

Action has been set as active action in an actor.

Calls these hook methods in addition to BaseActorAction.activate():

Reimplemented from Dragengine.Scenery.BaseActorAction.

References getFootSteps(), getProjectToGround(), playerInputCrouch, and projectToGround.

Referenced by playerReleasesControl().

◆ analogLookLR()

void Dragengine.Scenery.BAAFirstPerson.analogLookLR ( float amount,
bool sticky )

Analog looking left/right.

Implements Dragengine.Scenery.BAAMovement.

References moveBackwardStart(), and playerInputMove.

Referenced by updateAICollider().

◆ analogLookUD()

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

Analog looking up/down.

Implements Dragengine.Scenery.BAAMovement.

Reimplemented in Dragengine.Scenery.BAAFirstPersonVR.

References moveBackwardStop(), and playerInputMove.

Referenced by doesActorLand().

◆ analogMoveFB()

void Dragengine.Scenery.BAAFirstPerson.analogMoveFB ( float amount,
bool sticky )

Analog moving forward/backward.

Implements Dragengine.Scenery.BAAMovement.

Referenced by initPlayerInput().

◆ analogMoveLR()

void Dragengine.Scenery.BAAFirstPerson.analogMoveLR ( float amount,
bool sticky )

Analog moving left/right.

Implements Dragengine.Scenery.BAAMovement.

References moveIfColliderChanged, and think().

Referenced by initPlayerInput().

◆ applyLookAroundChanges()

void Dragengine.Scenery.BAAFirstPerson.applyLookAroundChanges ( float deltaHorizontal,
float deltaVertical )
protected

Apply looking around changes.

Called for player controlled actors only.

References lookRightStop(), and playerInputLook.

Referenced by persistencyFactoryName().

◆ canHitCollider()

bool Dragengine.Scenery.BAAFirstPerson.canHitCollider ( Collider owner,
Collider collider )

Two colliders can hit each other.

Returns always true.

Reimplemented from Dragengine.Scenery.BaseActorAction.

References initBehaviors().

◆ colliderChanged()

◆ collisionResponse()

void Dragengine.Scenery.BAAFirstPerson.collisionResponse ( Collider owner,
CollisionInfo info )

Collision detected.

If actor is touching ground applies sliding collision response. Otherwise checks if actor impacts with the ground at opposite direction than the project to ground test direction enable projecting to ground again.

Reimplemented from Dragengine.Scenery.BaseActorAction.

◆ crouchStart()

void Dragengine.Scenery.BAAFirstPerson.crouchStart ( )

Start crouching.

Implements Dragengine.Scenery.BAAMovement.

Reimplemented in Dragengine.Scenery.BAAFirstPersonVR.

References moveLeftStart().

Referenced by playerThink().

◆ crouchStop()

void Dragengine.Scenery.BAAFirstPerson.crouchStop ( )

Stop crouching.

Implements Dragengine.Scenery.BAAMovement.

Reimplemented in Dragengine.Scenery.BAAFirstPersonVR.

References playerInputMove.

Referenced by playerUpdateLocomotion().

◆ crouchToggle()

void Dragengine.Scenery.BAAFirstPerson.crouchToggle ( )

◆ doesActorLand()

bool Dragengine.Scenery.BAAFirstPerson.doesActorLand ( Collider owner,
CollisionInfo info )
protected

Free falling actor is landing.

Called during collisionResponse() to check if the actor has to switch from free falling to moving on ground again.

Default implementation returns true if the angle between the falling direction and the ground hit normal is larger than the landing angle.

References analogLookUD(), and playerInputLook.

Referenced by persistencyFactoryName().

◆ doTurnLook()

void Dragengine.Scenery.BAAFirstPerson.doTurnLook ( float elapsed)
protected

Apply turning and looking around.

Called for player controlled actors only. If ECBehaviorActorMover has a goal set does nothing to not interfere.

References lookRightStart(), and playerInputLook.

Referenced by persistencyFactoryName().

◆ getActorMover()

ECBehaviorActorMover.Instance Dragengine.Scenery.BAAFirstPerson.getActorMover ( )

◆ getColliderAI()

ECBehaviorColliderAI.Instance Dragengine.Scenery.BAAFirstPerson.getColliderAI ( )

Collider AI behavior.

Referenced by colliderChanged(), and getProjectToGround().

◆ getFootSteps()

ECBehaviorFootSteps.Instance Dragengine.Scenery.BAAFirstPerson.getFootSteps ( )

Foot steps behavior.

References colliderAI.

Referenced by activate(), and colliderChanged().

◆ getLandingAngle()

float Dragengine.Scenery.BAAFirstPerson.getLandingAngle ( )

Angle in degrees between falling direction and ground normal to land.

References new().

Referenced by getPlayerInputLook().

◆ getPlayerInputCrouch()

ECBehaviorPlayerInputCrouch.Instance Dragengine.Scenery.BAAFirstPerson.getPlayerInputCrouch ( )

Player input crouching behavior.

References pLandingAngle, and setLandingAngle().

Referenced by colliderChanged(), and getActorMover().

◆ getPlayerInputLook()

ECBehaviorPlayerInputLook.Instance Dragengine.Scenery.BAAFirstPerson.getPlayerInputLook ( )

Player input looking around behavior.

References getLandingAngle(), and pLandingAngle.

Referenced by colliderChanged(), and getActorMover().

◆ getPlayerInputMove()

ECBehaviorPlayerInputMove.Instance Dragengine.Scenery.BAAFirstPerson.getPlayerInputMove ( )

Player input moving behavior.

Referenced by colliderChanged(), and getActorMover().

◆ getProjectToGround()

ECBehaviorProjectToGround.Instance Dragengine.Scenery.BAAFirstPerson.getProjectToGround ( )

Project to ground behavior.

References getColliderAI().

Referenced by activate(), and colliderChanged().

◆ initBehaviors()

void Dragengine.Scenery.BAAFirstPerson.initBehaviors ( )
protected

Init behaviors.

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

Reimplemented from Dragengine.Scenery.BaseActorAction.

Reimplemented in Dragengine.Scenery.BAAFirstPersonVR.

References moveRightStop(), and playerInputMove.

Referenced by canHitCollider().

◆ initLocomotion()

void Dragengine.Scenery.BAAFirstPerson.initLocomotion ( )
protected

Initialize locomotion.

See ECBehaviorLocomotion.initHuman().

Sets these initial parameters:

  • Can turn: yes
  • Can turn in-place: yes
  • Linear velocity adjust range: ECBehaviorPlayerInputMove.getSpeedWalk()
  • Linear velocity adjust time: 1
  • Moving left right adjust time: 0
  • Looking limits: -80..80 (up-down) and -90..90 (left-right)
  • Looking adjust times: 1
  • Orientation adjust time: 1
  • Turn adjust look left-right: yes
  • Turn in-place limit: -70..70
  • Turn in-place adjust time: 1

Reimplemented in Dragengine.Scenery.BAAFirstPersonVR.

References playerInputMove, runStart(), runStop(), and runToggle().

Referenced by moveLeftStart(), persistencyFactoryName(), playerReleasesControl(), and postThink().

◆ initLocomotionPlayer()

void Dragengine.Scenery.BAAFirstPerson.initLocomotionPlayer ( )
protected

Initialize locomotion if player controls this actor.

Called in addition to (and after) initLocomotion() to apply changes which affect only the player. Typically this makes turning and looking direct in contrary to non-player actors where having a delay makes them behave smoother.

Applies these changes to parameters:

  • Looking adjust times: 0
  • Linear velocity adjust time: 0.5

Reimplemented in Dragengine.Scenery.BAAFirstPersonVR.

References lookLeftStart(), lookLeftStop(), and playerInputLook.

Referenced by moveForwardStart(), persistencyFactoryName(), and think().

◆ initPlayerInput()

void Dragengine.Scenery.BAAFirstPerson.initPlayerInput ( )
protected

Initialize player input tracker.

Sets ECBehaviorPlayerInputMove to LocomotionType.natural .

Reimplemented in Dragengine.Scenery.BAAFirstPersonVR.

References analogMoveFB(), analogMoveLR(), and playerInputMove.

Referenced by moveBackwardStop(), persistencyFactoryName(), playerReleasesControl(), and postThink().

◆ lookDownStart()

void Dragengine.Scenery.BAAFirstPerson.lookDownStart ( )

Start looking down.

Implements Dragengine.Scenery.BAAMovement.

Reimplemented in Dragengine.Scenery.BAAFirstPersonVR.

References moveForwardStop(), and playerInputMove.

Referenced by updateLocomotionPost().

◆ lookDownStop()

void Dragengine.Scenery.BAAFirstPerson.lookDownStop ( )

Stop looking down.

Implements Dragengine.Scenery.BAAMovement.

Reimplemented in Dragengine.Scenery.BAAFirstPersonVR.

Referenced by updateAICollider().

◆ lookLeftStart()

void Dragengine.Scenery.BAAFirstPerson.lookLeftStart ( )

Start looking left.

Implements Dragengine.Scenery.BAAMovement.

References postThink(), and projectToGround.

Referenced by initLocomotionPlayer().

◆ lookLeftStop()

void Dragengine.Scenery.BAAFirstPerson.lookLeftStop ( )

Stop looking left.

Implements Dragengine.Scenery.BAAMovement.

References colliderAI.

Referenced by initLocomotionPlayer().

◆ lookRightStart()

void Dragengine.Scenery.BAAFirstPerson.lookRightStart ( )

Start looking right.

Implements Dragengine.Scenery.BAAMovement.

References moveIfColliderChanged, and updateLocomotionPost().

Referenced by doTurnLook().

◆ lookRightStop()

void Dragengine.Scenery.BAAFirstPerson.lookRightStop ( )

Stop looking right.

Implements Dragengine.Scenery.BAAMovement.

Referenced by applyLookAroundChanges().

◆ lookUpStart()

void Dragengine.Scenery.BAAFirstPerson.lookUpStart ( )

Start looking up.

Implements Dragengine.Scenery.BAAMovement.

Reimplemented in Dragengine.Scenery.BAAFirstPersonVR.

References moveForwardStart().

Referenced by updateLocomotion().

◆ lookUpStop()

void Dragengine.Scenery.BAAFirstPerson.lookUpStop ( )

Stop looking up.

Implements Dragengine.Scenery.BAAMovement.

Reimplemented in Dragengine.Scenery.BAAFirstPersonVR.

References playerInputMove.

Referenced by updateLocomotionPost().

◆ moveBackwardStart()

void Dragengine.Scenery.BAAFirstPerson.moveBackwardStart ( )

Start moving backward.

Implements Dragengine.Scenery.BAAMovement.

Referenced by analogLookLR().

◆ moveBackwardStop()

void Dragengine.Scenery.BAAFirstPerson.moveBackwardStop ( )

Stop moving backward.

Implements Dragengine.Scenery.BAAMovement.

References initPlayerInput(), and playerReleasesControl().

Referenced by analogLookUD().

◆ moveForwardStart()

void Dragengine.Scenery.BAAFirstPerson.moveForwardStart ( )

Start moving forward.

Implements Dragengine.Scenery.BAAMovement.

References initLocomotionPlayer().

Referenced by lookUpStart().

◆ moveForwardStop()

void Dragengine.Scenery.BAAFirstPerson.moveForwardStop ( )

Stop moving forward.

Implements Dragengine.Scenery.BAAMovement.

Referenced by lookDownStart().

◆ moveLeftStart()

void Dragengine.Scenery.BAAFirstPerson.moveLeftStart ( )

Start moving left.

Implements Dragengine.Scenery.BAAMovement.

References initLocomotion().

Referenced by crouchStart().

◆ moveLeftStop()

void Dragengine.Scenery.BAAFirstPerson.moveLeftStop ( )

Stop moving left.

Implements Dragengine.Scenery.BAAMovement.

Referenced by crouchToggle().

◆ moveRightStart()

void Dragengine.Scenery.BAAFirstPerson.moveRightStart ( )

Start moving right.

Implements Dragengine.Scenery.BAAMovement.

Referenced by crouchToggle().

◆ moveRightStop()

void Dragengine.Scenery.BAAFirstPerson.moveRightStop ( )

Stop moving right.

Implements Dragengine.Scenery.BAAMovement.

Referenced by initBehaviors().

◆ new()

BAAFirstPerson Dragengine.Scenery.BAAFirstPerson.new ( )

Create actor action.

Reimplemented from Dragengine.Scenery.BaseActorAction.

Reimplemented in Dragengine.Scenery.BAAFirstPersonVR.

References actorMover.

Referenced by getLandingAngle().

◆ persistencyFactoryName()

String Dragengine.Scenery.BAAFirstPerson.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.BaseActorAction.

Reimplemented in Dragengine.Scenery.BAAFirstPersonVR.

References actorMover, applyLookAroundChanges(), colliderAI, doesActorLand(), doTurnLook(), Dragengine.Scenery.BaseActorAction.getLocomotion(), initLocomotion(), initLocomotionPlayer(), initPlayerInput(), Dragengine.Scenery.BaseActorAction.locomotion, playerInputCrouch, playerInputLook, playerInputMove, projectToGround, updateAICollider(), updateLocomotion(), and updateLocomotionPost().

◆ playerReleasesControl()

void Dragengine.Scenery.BAAFirstPerson.playerReleasesControl ( )

Player released control of actor.

Calls these hook methods:

Reimplemented from Dragengine.Scenery.BaseActorAction.

References activate(), initLocomotion(), and initPlayerInput().

Referenced by moveBackwardStop().

◆ playerTakesControl()

void Dragengine.Scenery.BAAFirstPerson.playerTakesControl ( )

Player takes control of actor.

Calls these hook methods:

Reimplemented from Dragengine.Scenery.BaseActorAction.

References actorMover, footSteps, and getActorMover().

Referenced by postThink().

◆ playerThink()

void Dragengine.Scenery.BAAFirstPerson.playerThink ( float elapsed)

Thinking for player controlled actor only.

Calls these hook methods:

Reimplemented from Dragengine.Scenery.BaseActorAction.

References crouchStart().

◆ playerUpdateLocomotion()

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

Update locomotion.

If ECBehaviorActorMover has a goal set does nothing to not interfere.

Reimplemented in Dragengine.Scenery.BAAFirstPersonVR.

References crouchStop(), crouchToggle(), and playerInputCrouch.

◆ postThink()

void Dragengine.Scenery.BAAFirstPerson.postThink ( float elapsed)

Post physics.

Actor position is updated by ECBehaviorProjectToGround if present in the actor. Otherwise updates the actor element position and orientation from AI collider.

Default implementation does these actions in this order:

Reimplemented from Dragengine.Scenery.BaseActorAction.

References initLocomotion(), initPlayerInput(), and playerTakesControl().

Referenced by lookLeftStart().

◆ runStart()

void Dragengine.Scenery.BAAFirstPerson.runStart ( )

Start running.

Implements Dragengine.Scenery.BAAMovement.

Referenced by initLocomotion().

◆ runStop()

void Dragengine.Scenery.BAAFirstPerson.runStop ( )

Stop running.

Implements Dragengine.Scenery.BAAMovement.

Referenced by initLocomotion().

◆ runToggle()

void Dragengine.Scenery.BAAFirstPerson.runToggle ( )

Toggle running.

Implements Dragengine.Scenery.BAAMovement.

Referenced by initLocomotion().

◆ setLandingAngle()

void Dragengine.Scenery.BAAFirstPerson.setLandingAngle ( float angle)

Set angle in degrees between falling direction and ground normal to land.

References moveIfColliderChanged, and pLandingAngle.

Referenced by getPlayerInputCrouch().

◆ think()

void Dragengine.Scenery.BAAFirstPerson.think ( float elapsed)

Thinking.

Default implementation does these actions in this order:

Reimplemented from Dragengine.Scenery.BaseActorAction.

References initLocomotionPlayer(), and Dragengine.Scenery.BaseActorAction.isControlledByPlayer().

Referenced by analogMoveLR().

◆ updateAICollider()

void Dragengine.Scenery.BAAFirstPerson.updateAICollider ( float elapsed)
protected

Update collider.

Sets orientation and linear velocity from locomotion if actor is touching ground. If not touching ground earth type gravitation is applied.

Actor is considered not touching ground if ProjectToGround has not found a ground collider during the last postThink() call.

Reimplemented from Dragengine.Scenery.BaseActorAction.

References analogLookLR(), lookDownStop(), and playerInputLook.

Referenced by persistencyFactoryName().

◆ updateLocomotion()

void Dragengine.Scenery.BAAFirstPerson.updateLocomotion ( float elapsed)
protected

◆ updateLocomotionPost()

void Dragengine.Scenery.BAAFirstPerson.updateLocomotionPost ( float elapsed)
protected

Post-Update locomotion.

References lookDownStart(), lookUpStop(), and playerInputLook.

Referenced by lookRightStart(), and persistencyFactoryName().

Member Data Documentation

◆ actorMover

ECBehaviorActorMover.Instance Dragengine.Scenery.BAAFirstPerson.actorMover
protected

◆ colliderAI

ECBehaviorColliderAI.Instance Dragengine.Scenery.BAAFirstPerson.colliderAI
protected

◆ footSteps

ECBehaviorFootSteps.Instance Dragengine.Scenery.BAAFirstPerson.footSteps
protected

Foot steps behavior.

Referenced by colliderChanged(), and playerTakesControl().

◆ moveIfColliderChanged

bool Dragengine.Scenery.BAAFirstPerson.moveIfColliderChanged
protected

Property update actor geometry on collider changed.

For performance reasons updating the actor geometry not done during colliderChanged() but during postThink() when project to ground has been done. Between postThink() and the next elementThink() actor geometry has to be updated or the actor element matrix is out of sync when AI operates on it. This parameter is used to keep track of

Referenced by analogMoveLR(), lookRightStart(), and setLandingAngle().

◆ pLandingAngle

float Dragengine.Scenery.BAAFirstPerson.pLandingAngle

◆ playerInputCrouch

ECBehaviorPlayerInputCrouch.Instance Dragengine.Scenery.BAAFirstPerson.playerInputCrouch
protected

◆ playerInputLook

◆ playerInputMove

◆ projectToGround

ECBehaviorProjectToGround.Instance Dragengine.Scenery.BAAFirstPerson.projectToGround
protected

Project to ground behavior.

Referenced by activate(), colliderChanged(), lookLeftStart(), and persistencyFactoryName().


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