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

Conversation Eyes Look-At Playback. More...

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

Public Member Functions

void applyAnimation ()
 Apply animation.
Animator getAnimator ()
 Animator or null if not set.
AnimatorInstance getAnimatorInstance ()
 Animator instance.
String getBoneDisable ()
 Name of disable bone or null if not used.
String getBoneRotator ()
 Name of rotator bone or null if not used.
AnimatorController getControllerDisable ()
 Disable eye looking animator controller or null if not used.
AnimatorController getControllerHorizontal ()
 Look eyes left and right animator controller or null if not used.
AnimatorController getControllerVertical ()
 Look eyes up and down animator controller or null if not used.
int getIndexBoneDisable ()
 Index of disable bone or -1 if not used.
DMatrix getInverseMatrix (ConversationActor actor)
 Calculate the inverse matrix.
String getNameControllerDisabled ()
 Disabled controller name.
String getNameControllerHorizontal ()
 Left-right controller name.
String getNameControllerVertical ()
 Up-down controller name.
DMatrix getRotatorMatrix ()
 Rotator matrix.
CharacterEyesLookAtPlayback new ()
 Create playback.
void setAnimator (Animator animator)
 Set animator or null if not set.
void setBoneDisable (String boneName)
 Set name of disable bone or null if not used.
void setBoneRotator (String boneName)
 Set name of rotator bone or null if not used.
void setNameControllerDisabled (String name)
 Set disabled controller name.
void setNameControllerHorizontal (String name)
 Set left-right controller name.
void setNameControllerVertical (String name)
 Set up-down controller name.
void setRotatorMatrix (DMatrix matrix)
 Set rotator matrix.
void updateActorLookAt (ConversationActor actor, float blendFactor)
 Update actor look-at.
void updateIndexBoneDisable ()
 Update index of disable bone if present.
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 clearLookAtState ()
 Clear current look-at state allowing the actor to take over control.
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 readFromFile (PersistencyEnvironment env, FileReader reader)
 Read element from a file.
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.
void writeToFile (PersistencyEnvironment env, FileWriter writer)
 Writes to file.

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 Eyes Look-At Playback.

Updates an animator to make eyes of actors track a target. Supports three named controllers: Left-Right controller, Up-Down controller and Disabled controller. The default names are "eyesLookAt.horizontal", "eyesLookAt.vertical" and "eyesLookAt.disabled" which can be changed. The disabled controller enables the eye animation if the controller value is at lower value or disables if at upper value. If the assigned animator does not have matching named controllers the respective values are not updated.

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 eyes rotate 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.

Optionally a disable bone can be used. This allows to allow previous animations to disable the eye looking effect temporarily. The value of this bone Z position in bone local coordinates is assigned to the disable controller. If not used eyes are always updated.

Member Function Documentation

◆ applyAnimation()

◆ getAnimator()

Animator Dragengine.ConversationSystem.CharacterEyesLookAtPlayback.getAnimator ( )

Animator or null if not set.

Referenced by getAnimatorInstance().

◆ getAnimatorInstance()

AnimatorInstance Dragengine.ConversationSystem.CharacterEyesLookAtPlayback.getAnimatorInstance ( )

Animator instance.

References getAnimator().

Referenced by getControllerHorizontal().

◆ getBoneDisable()

String Dragengine.ConversationSystem.CharacterEyesLookAtPlayback.getBoneDisable ( )

Name of disable bone or null if not used.

References setNameControllerVertical().

Referenced by applyAnimation().

◆ getBoneRotator()

String Dragengine.ConversationSystem.CharacterEyesLookAtPlayback.getBoneRotator ( )

Name of rotator bone or null if not used.

References setNameControllerHorizontal().

Referenced by applyAnimation().

◆ getControllerDisable()

AnimatorController Dragengine.ConversationSystem.CharacterEyesLookAtPlayback.getControllerDisable ( )

Disable eye looking animator controller or null if not used.

References getNameControllerHorizontal().

Referenced by applyAnimation().

◆ getControllerHorizontal()

AnimatorController Dragengine.ConversationSystem.CharacterEyesLookAtPlayback.getControllerHorizontal ( )

Look eyes left and right animator controller or null if not used.

References getAnimatorInstance().

Referenced by applyAnimation().

◆ getControllerVertical()

AnimatorController Dragengine.ConversationSystem.CharacterEyesLookAtPlayback.getControllerVertical ( )

Look eyes up and down animator controller or null if not used.

Referenced by applyAnimation().

◆ getIndexBoneDisable()

int Dragengine.ConversationSystem.CharacterEyesLookAtPlayback.getIndexBoneDisable ( )

Index of disable bone or -1 if not used.

Referenced by applyAnimation().

◆ getInverseMatrix()

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

Calculate the inverse matrix.

Reimplemented from Dragengine.ConversationSystem.ConversationLookAtPlayback.

Referenced by applyAnimation().

◆ getNameControllerDisabled()

String Dragengine.ConversationSystem.CharacterEyesLookAtPlayback.getNameControllerDisabled ( )

Disabled controller name.

References updateIndexBoneDisable().

Referenced by updateIndexBoneDisable().

◆ getNameControllerHorizontal()

String Dragengine.ConversationSystem.CharacterEyesLookAtPlayback.getNameControllerHorizontal ( )

Left-right controller name.

References setAnimator().

Referenced by getControllerDisable().

◆ getNameControllerVertical()

String Dragengine.ConversationSystem.CharacterEyesLookAtPlayback.getNameControllerVertical ( )

Up-down controller name.

References setAnimator().

Referenced by setRotatorMatrix().

◆ getRotatorMatrix()

DMatrix Dragengine.ConversationSystem.CharacterEyesLookAtPlayback.getRotatorMatrix ( )

Rotator matrix.

Referenced by applyAnimation().

◆ new()

CharacterEyesLookAtPlayback Dragengine.ConversationSystem.CharacterEyesLookAtPlayback.new ( )

Create playback.

Reimplemented from Dragengine.ConversationSystem.ConversationLookAtPlayback.

References new().

Referenced by new().

◆ setAnimator()

void Dragengine.ConversationSystem.CharacterEyesLookAtPlayback.setAnimator ( Animator animator)

Set animator or null if not set.

Referenced by getNameControllerHorizontal(), and getNameControllerVertical().

◆ setBoneDisable()

void Dragengine.ConversationSystem.CharacterEyesLookAtPlayback.setBoneDisable ( String boneName)

Set name of disable bone or null if not used.

Referenced by applyAnimation().

◆ setBoneRotator()

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

Set name of rotator bone or null if not used.

Referenced by applyAnimation().

◆ setNameControllerDisabled()

void Dragengine.ConversationSystem.CharacterEyesLookAtPlayback.setNameControllerDisabled ( String name)

Set disabled controller name.

Referenced by updateActorLookAt().

◆ setNameControllerHorizontal()

void Dragengine.ConversationSystem.CharacterEyesLookAtPlayback.setNameControllerHorizontal ( String name)

Set left-right controller name.

Referenced by getBoneRotator().

◆ setNameControllerVertical()

void Dragengine.ConversationSystem.CharacterEyesLookAtPlayback.setNameControllerVertical ( String name)

Set up-down controller name.

Referenced by getBoneDisable().

◆ setRotatorMatrix()

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

Set rotator matrix.

References getNameControllerVertical().

Referenced by applyAnimation().

◆ updateActorLookAt()

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

Update actor look-at.

Reimplemented from Dragengine.ConversationSystem.ConversationLookAtPlayback.

References setNameControllerDisabled().

Referenced by applyAnimation().

◆ updateIndexBoneDisable()

void Dragengine.ConversationSystem.CharacterEyesLookAtPlayback.updateIndexBoneDisable ( )

Update index of disable bone if present.

References getNameControllerDisabled().

Referenced by applyAnimation(), and getNameControllerDisabled().


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