|
Drag[en]gine Script Module DragonScript 1.35
|
Conversation Eyes Look-At Playback. More...
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 |
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.
References applyAnimation(), getBoneDisable(), getBoneRotator(), getControllerDisable(), getControllerHorizontal(), getControllerVertical(), Dragengine.ConversationSystem.ConversationLookAtPlayback.getCurrentLookAtPosition(), getIndexBoneDisable(), getInverseMatrix(), Dragengine.ConversationSystem.ConversationLookAtPlayback.getLastLookAtPosition(), getRotatorMatrix(), setBoneDisable(), setBoneRotator(), setRotatorMatrix(), updateActorLookAt(), and updateIndexBoneDisable().
Referenced by applyAnimation().
| Animator Dragengine.ConversationSystem.CharacterEyesLookAtPlayback.getAnimator | ( | ) |
Animator or null if not set.
Referenced by getAnimatorInstance().
| AnimatorInstance Dragengine.ConversationSystem.CharacterEyesLookAtPlayback.getAnimatorInstance | ( | ) |
| String Dragengine.ConversationSystem.CharacterEyesLookAtPlayback.getBoneDisable | ( | ) |
Name of disable bone or null if not used.
References setNameControllerVertical().
Referenced by applyAnimation().
| String Dragengine.ConversationSystem.CharacterEyesLookAtPlayback.getBoneRotator | ( | ) |
Name of rotator bone or null if not used.
References setNameControllerHorizontal().
Referenced by applyAnimation().
| AnimatorController Dragengine.ConversationSystem.CharacterEyesLookAtPlayback.getControllerDisable | ( | ) |
Disable eye looking animator controller or null if not used.
References getNameControllerHorizontal().
Referenced by applyAnimation().
| AnimatorController Dragengine.ConversationSystem.CharacterEyesLookAtPlayback.getControllerHorizontal | ( | ) |
Look eyes left and right animator controller or null if not used.
References getAnimatorInstance().
Referenced by applyAnimation().
| AnimatorController Dragengine.ConversationSystem.CharacterEyesLookAtPlayback.getControllerVertical | ( | ) |
Look eyes up and down animator controller or null if not used.
Referenced by applyAnimation().
| int Dragengine.ConversationSystem.CharacterEyesLookAtPlayback.getIndexBoneDisable | ( | ) |
Index of disable bone or -1 if not used.
Referenced by applyAnimation().
| DMatrix Dragengine.ConversationSystem.CharacterEyesLookAtPlayback.getInverseMatrix | ( | ConversationActor | actor | ) |
Calculate the inverse matrix.
Reimplemented from Dragengine.ConversationSystem.ConversationLookAtPlayback.
Referenced by applyAnimation().
| String Dragengine.ConversationSystem.CharacterEyesLookAtPlayback.getNameControllerDisabled | ( | ) |
Disabled controller name.
References updateIndexBoneDisable().
Referenced by updateIndexBoneDisable().
| String Dragengine.ConversationSystem.CharacterEyesLookAtPlayback.getNameControllerHorizontal | ( | ) |
| String Dragengine.ConversationSystem.CharacterEyesLookAtPlayback.getNameControllerVertical | ( | ) |
| DMatrix Dragengine.ConversationSystem.CharacterEyesLookAtPlayback.getRotatorMatrix | ( | ) |
Rotator matrix.
Referenced by applyAnimation().
| CharacterEyesLookAtPlayback Dragengine.ConversationSystem.CharacterEyesLookAtPlayback.new | ( | ) |
Create playback.
Reimplemented from Dragengine.ConversationSystem.ConversationLookAtPlayback.
References new().
Referenced by new().
| void Dragengine.ConversationSystem.CharacterEyesLookAtPlayback.setAnimator | ( | Animator | animator | ) |
Set animator or null if not set.
Referenced by getNameControllerHorizontal(), and getNameControllerVertical().
| void Dragengine.ConversationSystem.CharacterEyesLookAtPlayback.setBoneDisable | ( | String | boneName | ) |
Set name of disable bone or null if not used.
Referenced by applyAnimation().
| void Dragengine.ConversationSystem.CharacterEyesLookAtPlayback.setBoneRotator | ( | String | boneName | ) |
Set name of rotator bone or null if not used.
Referenced by applyAnimation().
| void Dragengine.ConversationSystem.CharacterEyesLookAtPlayback.setNameControllerDisabled | ( | String | name | ) |
Set disabled controller name.
Referenced by updateActorLookAt().
| void Dragengine.ConversationSystem.CharacterEyesLookAtPlayback.setNameControllerHorizontal | ( | String | name | ) |
Set left-right controller name.
Referenced by getBoneRotator().
| void Dragengine.ConversationSystem.CharacterEyesLookAtPlayback.setNameControllerVertical | ( | String | name | ) |
Set up-down controller name.
Referenced by getBoneDisable().
| void Dragengine.ConversationSystem.CharacterEyesLookAtPlayback.setRotatorMatrix | ( | DMatrix | matrix | ) |
| void Dragengine.ConversationSystem.CharacterEyesLookAtPlayback.updateActorLookAt | ( | ConversationActor | actor, |
| float | blendFactor ) |
Update actor look-at.
Reimplemented from Dragengine.ConversationSystem.ConversationLookAtPlayback.
References setNameControllerDisabled().
Referenced by applyAnimation().
| void Dragengine.ConversationSystem.CharacterEyesLookAtPlayback.updateIndexBoneDisable | ( | ) |
Update index of disable bone if present.
References getNameControllerDisabled().
Referenced by applyAnimation(), and getNameControllerDisabled().