Drag[en]gine Script Module DragonScript
1.23
|
Conversation Eyes Look-At Playback. More...
Public Member Functions | |
void | applyAnimation () |
Apply animation. More... | |
Animator | getAnimator () |
Animator or null if not set. More... | |
AnimatorInstance | getAnimatorInstance () |
Animator instance. More... | |
String | getBoneDisable () |
Name of disable bone or null if not used. More... | |
String | getBoneRotator () |
Name of rotator bone or null if not used. More... | |
AnimatorController | getControllerDisable () |
Disable eye looking animator controller or null if not used. More... | |
AnimatorController | getControllerHorizontal () |
Look eyes left and right animator controller or null if not used. More... | |
AnimatorController | getControllerVertical () |
Look eyes up and down animator controller or null if not used. More... | |
int | getIndexBoneDisable () |
Index of disable bone or -1 if not used. More... | |
DMatrix | getInverseMatrix (ConversationActor actor) |
Calculate the inverse matrix. More... | |
String | getNameControllerDisabled () |
Disabled controller name. More... | |
String | getNameControllerHorizontal () |
Left-right controller name. More... | |
String | getNameControllerVertical () |
Up-down controller name. More... | |
DMatrix | getRotatorMatrix () |
Rotator matrix. More... | |
CharacterEyesLookAtPlayback | new () |
Create playback. More... | |
void | setAnimator (Animator animator) |
Set animator or null if not set. More... | |
void | setBoneDisable (String boneName) |
Set name of disable bone or null if not used. More... | |
void | setBoneRotator (String boneName) |
Set name of rotator bone or null if not used. More... | |
void | setNameControllerDisabled (String name) |
Set disabled controller name. More... | |
void | setNameControllerHorizontal (String name) |
Set left-right controller name. More... | |
void | setNameControllerVertical (String name) |
Set up-down controller name. More... | |
void | setRotatorMatrix (DMatrix matrix) |
Set rotator matrix. More... | |
void | updateActorLookAt (ConversationActor actor, float blendFactor) |
Update actor look-at. More... | |
void | updateIndexBoneDisable () |
Update index of disable bone if present. More... | |
Public Member Functions inherited from Dragengine.ConversationSystem.ConversationLookAtPlayback | |
void | addFadeOutLookAt (float transitionTime) |
Add fade out look-at. More... | |
void | addLookAt (ConversationPlaybackLookAt lookAt, ConversationStrip strip) |
Add strip. More... | |
void | clearLookAtState () |
Clear current look-at state allowing the actor to take over control. More... | |
void | forEachLookAts (Block ablock) |
Visit look-ats to playback using block with argument LookAt. More... | |
ConversationPlaybackLookAt | getCurrentLookAt () |
Current look-at to blend with or null if not set. More... | |
DVector | getCurrentLookAtPosition () |
Current look-at position to blend with or null if not set. More... | |
float | getElapsed () |
Elapsed time. More... | |
ConversationPlaybackLookAt | getLastLookAt () |
Last look-at to blend from or null if not set. More... | |
DVector | getLastLookAtPosition () |
Last look-at position to blend from or null if not set. More... | |
LookAt | getLookAtAt (int index) |
Look-at to play back at index. More... | |
int | getLookAtCount () |
Count of look-ats to play back. More... | |
int | getPosition () |
Playback position as index of look-at currently being played back. More... | |
bool | getRunning () |
A strip is running. More... | |
void | playbackRestoreObjectLinks (ConversationPlayback playback) |
Restore linked objects after loading. More... | |
void | readFromFile (PersistencyEnvironment env, FileReader reader) |
Read element from a file. More... | |
void | removeAllLookAts () |
Remove all look-ats. More... | |
void | setCurrentLookAt (ConversationPlaybackLookAt lookAt) |
Set current look-at to blend with or null if not set. More... | |
void | setCurrentLookAtPosition (DVector position) |
Set current look-at position to blend with or null if not set. More... | |
void | setLastLookAt (ConversationPlaybackLookAt lookAt) |
Set last look-at to blend from or null if not set. More... | |
void | setLastLookAtPosition (DVector position) |
Set last look-at position to blend from or null if not set. More... | |
void | update (ConversationActor actor, float elapsed) |
Update playback. More... | |
void | writeToFile (PersistencyEnvironment env, FileWriter writer) |
Writes to file. More... | |
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.
void Dragengine.ConversationSystem.CharacterEyesLookAtPlayback.applyAnimation | ( | ) |
Apply animation.
Called after update() to apply animation. Can do nothing if no change has been done.
Reimplemented from Dragengine.ConversationSystem.ConversationLookAtPlayback.
Animator Dragengine.ConversationSystem.CharacterEyesLookAtPlayback.getAnimator | ( | ) |
Animator or null if not set.
AnimatorInstance Dragengine.ConversationSystem.CharacterEyesLookAtPlayback.getAnimatorInstance | ( | ) |
Animator instance.
String Dragengine.ConversationSystem.CharacterEyesLookAtPlayback.getBoneDisable | ( | ) |
Name of disable bone or null if not used.
String Dragengine.ConversationSystem.CharacterEyesLookAtPlayback.getBoneRotator | ( | ) |
Name of rotator bone or null if not used.
AnimatorController Dragengine.ConversationSystem.CharacterEyesLookAtPlayback.getControllerDisable | ( | ) |
Disable eye looking animator controller or null if not used.
AnimatorController Dragengine.ConversationSystem.CharacterEyesLookAtPlayback.getControllerHorizontal | ( | ) |
Look eyes left and right animator controller or null if not used.
AnimatorController Dragengine.ConversationSystem.CharacterEyesLookAtPlayback.getControllerVertical | ( | ) |
Look eyes up and down animator controller or null if not used.
int Dragengine.ConversationSystem.CharacterEyesLookAtPlayback.getIndexBoneDisable | ( | ) |
Index of disable bone or -1 if not used.
DMatrix Dragengine.ConversationSystem.CharacterEyesLookAtPlayback.getInverseMatrix | ( | ConversationActor | actor | ) |
Calculate the inverse matrix.
Reimplemented from Dragengine.ConversationSystem.ConversationLookAtPlayback.
String Dragengine.ConversationSystem.CharacterEyesLookAtPlayback.getNameControllerDisabled | ( | ) |
Disabled controller name.
String Dragengine.ConversationSystem.CharacterEyesLookAtPlayback.getNameControllerHorizontal | ( | ) |
Left-right controller name.
String Dragengine.ConversationSystem.CharacterEyesLookAtPlayback.getNameControllerVertical | ( | ) |
Up-down controller name.
DMatrix Dragengine.ConversationSystem.CharacterEyesLookAtPlayback.getRotatorMatrix | ( | ) |
Rotator matrix.
CharacterEyesLookAtPlayback Dragengine.ConversationSystem.CharacterEyesLookAtPlayback.new | ( | ) |
Create playback.
Reimplemented from Dragengine.ConversationSystem.ConversationLookAtPlayback.
void Dragengine.ConversationSystem.CharacterEyesLookAtPlayback.setAnimator | ( | Animator | animator | ) |
Set animator or null if not set.
void Dragengine.ConversationSystem.CharacterEyesLookAtPlayback.setBoneDisable | ( | String | boneName | ) |
Set name of disable bone or null if not used.
void Dragengine.ConversationSystem.CharacterEyesLookAtPlayback.setBoneRotator | ( | String | boneName | ) |
Set name of rotator bone or null if not used.
void Dragengine.ConversationSystem.CharacterEyesLookAtPlayback.setNameControllerDisabled | ( | String | name | ) |
Set disabled controller name.
void Dragengine.ConversationSystem.CharacterEyesLookAtPlayback.setNameControllerHorizontal | ( | String | name | ) |
Set left-right controller name.
void Dragengine.ConversationSystem.CharacterEyesLookAtPlayback.setNameControllerVertical | ( | String | name | ) |
Set up-down controller name.
void Dragengine.ConversationSystem.CharacterEyesLookAtPlayback.setRotatorMatrix | ( | DMatrix | matrix | ) |
Set rotator matrix.
void Dragengine.ConversationSystem.CharacterEyesLookAtPlayback.updateActorLookAt | ( | ConversationActor | actor, |
float | blendFactor | ||
) |
Update actor look-at.
Reimplemented from Dragengine.ConversationSystem.ConversationLookAtPlayback.
void Dragengine.ConversationSystem.CharacterEyesLookAtPlayback.updateIndexBoneDisable | ( | ) |
Update index of disable bone if present.