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

Conversation Look-At Playback manipulating locomotion parameters. More...

Inheritance diagram for Dragengine.ConversationSystem.ConversationHeadLookAtPlayback:
Dragengine.ConversationSystem.ConversationLookAtPlayback

Public Member Functions

void clearLookAtState ()
 Clear current look-at state allowing the actor to take over control.
String getBoneRotator ()
 Name of rotator bone or null if not used.
DMatrix getInverseMatrix (ConversationActor actor)
 Calculate the inverse matrix.
Locomotion getLocomotion ()
 Locomotion to update.
DMatrix getRotatorMatrix ()
 Rotator matrix.
ConversationHeadLookAtPlayback new ()
 Create playback.
void readFromFile (PersistencyEnvironment env, FileReader reader)
 Read from file.
void setBoneRotator (String boneName)
 Set name of rotator bone or null if not used.
void setLocomotion (Locomotion locomotion)
 Set locomotion to update.
void setRotatorMatrix (DMatrix matrix)
 Set rotator matrix.
void updateActorLookAt (ConversationActor actor, float blendFactor)
 Update actor look-at.
void writeToFile (PersistencyEnvironment env, FileWriter writer)
 Write element to file.
Public Member Functions inherited from Dragengine.ConversationSystem.ConversationLookAtPlayback
void addFadeOutLookAt (float transitionTime)
 Add fade out look-at.
void addLookAt (ConversationPlaybackLookAt lookAt, ConversationStrip strip)
 Add strip.
void applyAnimation ()
 Apply animation.
void forEachLookAts (Block ablock)
 Visit look-ats to playback using block with argument LookAt.
ConversationPlaybackLookAt getCurrentLookAt ()
 Current look-at to blend with or null if not set.
DVector getCurrentLookAtPosition ()
 Current look-at position to blend with or null if not set.
float getElapsed ()
 Elapsed time.
ConversationPlaybackLookAt getLastLookAt ()
 Last look-at to blend from or null if not set.
DVector getLastLookAtPosition ()
 Last look-at position to blend from or null if not set.
LookAt getLookAtAt (int index)
 Look-at to play back at index.
int getLookAtCount ()
 Count of look-ats to play back.
int getPosition ()
 Playback position as index of look-at currently being played back.
bool getRunning ()
 A strip is running.
void playbackRestoreObjectLinks (ConversationPlayback playback)
 Restore linked objects after loading.
void removeAllLookAts ()
 Remove all look-ats.
void removeNonRunningLookAts ()
 Remove all non-playing look-ats.
void setCurrentLookAt (ConversationPlaybackLookAt lookAt)
 Set current look-at to blend with or null if not set.
void setCurrentLookAtPosition (DVector position)
 Set current look-at position to blend with or null if not set.
void setLastLookAt (ConversationPlaybackLookAt lookAt)
 Set last look-at to blend from or null if not set.
void setLastLookAtPosition (DVector position)
 Set last look-at position to blend from or null if not set.
void update (ConversationActor actor, float elapsed)
 Update playback.

Additional Inherited Members

Public Attributes inherited from Dragengine.ConversationSystem.ConversationLookAtPlayback
ConversationPlaybackLookAt pCurLookAt
DVector pCurLookAtPosition
float pElapsed
ConversationPlaybackLookAt pLastLookAt
DVector pLastLookAtPosition
Array pLookAts
int pPosition
bool pRunning

Detailed Description

Conversation Look-At Playback manipulating locomotion parameters.

Updates the look left-right and up-down parameters of an locomotion. This is typically used to make actors turn their head to look at specific positions during conversation.

To calculate the appropriate parameters this class it is recommanded to use a rotator bone. This is a particular bone in the actor rig which is placed at a location the head rotates about roughly. If such a bone is not used the actor itself is used.

Look-at targets are required to be placed on the same height as the reference point used in this class to calculate the angles.

Optionally a rotator matrix can be set. This helps to fine tune the rotation calculation in case the target is not located at the same height as the reference point used. This is for example the case if the target is placed at eye level while the rotator bone is located at the head base.

Member Function Documentation

◆ clearLookAtState()

void Dragengine.ConversationSystem.ConversationHeadLookAtPlayback.clearLookAtState ( )

Clear current look-at state allowing the actor to take over control.

Reimplemented from Dragengine.ConversationSystem.ConversationLookAtPlayback.

References getRotatorMatrix().

Referenced by readFromFile(), and writeToFile().

◆ getBoneRotator()

String Dragengine.ConversationSystem.ConversationHeadLookAtPlayback.getBoneRotator ( )

Name of rotator bone or null if not used.

References setLocomotion().

Referenced by getRotatorMatrix().

◆ getInverseMatrix()

DMatrix Dragengine.ConversationSystem.ConversationHeadLookAtPlayback.getInverseMatrix ( ConversationActor actor)

Calculate the inverse matrix.

Reimplemented from Dragengine.ConversationSystem.ConversationLookAtPlayback.

Referenced by writeToFile().

◆ getLocomotion()

Locomotion Dragengine.ConversationSystem.ConversationHeadLookAtPlayback.getLocomotion ( )

Locomotion to update.

Referenced by setLocomotion().

◆ getRotatorMatrix()

DMatrix Dragengine.ConversationSystem.ConversationHeadLookAtPlayback.getRotatorMatrix ( )

Rotator matrix.

References getBoneRotator().

Referenced by clearLookAtState().

◆ new()

ConversationHeadLookAtPlayback Dragengine.ConversationSystem.ConversationHeadLookAtPlayback.new ( )

Create playback.

Reimplemented from Dragengine.ConversationSystem.ConversationLookAtPlayback.

References new().

Referenced by new(), and writeToFile().

◆ readFromFile()

void Dragengine.ConversationSystem.ConversationHeadLookAtPlayback.readFromFile ( PersistencyEnvironment env,
FileReader reader )

Read from file.

Reimplemented from Dragengine.ConversationSystem.ConversationLookAtPlayback.

References clearLookAtState().

Referenced by writeToFile().

◆ setBoneRotator()

void Dragengine.ConversationSystem.ConversationHeadLookAtPlayback.setBoneRotator ( String boneName)

Set name of rotator bone or null if not used.

Referenced by setRotatorMatrix().

◆ setLocomotion()

void Dragengine.ConversationSystem.ConversationHeadLookAtPlayback.setLocomotion ( Locomotion locomotion)

Set locomotion to update.

References getLocomotion().

Referenced by getBoneRotator().

◆ setRotatorMatrix()

void Dragengine.ConversationSystem.ConversationHeadLookAtPlayback.setRotatorMatrix ( DMatrix matrix)

Set rotator matrix.

References setBoneRotator().

Referenced by updateActorLookAt().

◆ updateActorLookAt()

void Dragengine.ConversationSystem.ConversationHeadLookAtPlayback.updateActorLookAt ( ConversationActor actor,
float blendFactor )

Update actor look-at.

Reimplemented from Dragengine.ConversationSystem.ConversationLookAtPlayback.

References setRotatorMatrix().

Referenced by writeToFile().

◆ writeToFile()


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