Play Animation
Last updated
Last updated
Play Animation is an Animation Node used to start playing an Animation. The Animation to play has to be selected in the Attributes. For this, simply drag an Animation .incani
file from the Asset Manager to the File
Attribute and then a drop-down Menu that allows the user to choose an Animation Block will appear.
When an Animation starts playing, an Instance ID gets assigned to it, which is then used to control the Animation with the Pause Animation or Stop Animation Nodes. This Instance ID can be set with the Create CustomID Node connected to the Instance ID
Input Socket. If nothing is connected, the default value 42 is used.
It is also possible to reuse an Animation with a different Object.
Scope: Scene, Function, Prefab.
File
User Input
Name
Drop-down
The specified Animation Block created in the Animation Editor that will be played.
Pulse Input (►)
Pulse
A standard Input Pulse, to trigger the execution of the Node.
Instance ID
InstanceID
Pulse Output (►)
Pulse
A standard Output Pulse, to move onto the next Node along the Logic Branch, once this Node has finished its execution.
Instance ID
InstanceID
OnPlay
Pulse
Flows to additional Nodes following Play Animation when the Animation starts playing.
OnPause
Pulse
Flows to additional Nodes following Play Animation if the Animation pauses.
OnStop
Pulse
Flows to additional Nodes following Play Animation if the Animation stops.
Using the Play Animation Node, it is possible to reuse an Animation for a different Object than the one used in the .incani
file. For this, the ObjectID Input Sockets must be used.
When an Animation Block is assigned to the Play Animation Node in the Attributes, new ObjectID Input Sockets are created, one for each Object in the Animation Block. These Input Socket can be used to animate a different Object.
Thus, a Play Animation Node with an Object connected to the ObjectID Sockets will animate that Object instead of the one defined in the Animation Block. In the example below, Object2
will be animated instead of Object1
, which was the Object originally used in the Animation.
Prefabs are a bit special when it comes to their animation. There are two Scopes of Logic which must be considered. These are the Scene Logic and Prefab Logic.
Whatever instance is assigned to the Prefab Node in the Scene Logic is ultimately what gets animated. Remember, the Prefab Node represents whatever Logic has been set up in the Prefab Logic. In the image below, the instance is Prefab1 - Instance 2
and the Prefab Node is Prefab1
.
During runtime, the Master Prefab basically does nothing. This is why it is required to assign an instance of the Prefab to the Prefab Node to trigger the Prefab Logic of this instance.
However, it is still necessary to assign the Master Prefab Object to the Prefab Logic. It will be replaced by the Prefab instance that has been assigned in the Scene Logic. This will lend to a smooth animation process within Incari Studio in regards to Prefabs.
The selected Animation file created in the . The user can drag a file from their library or select a file from a file tree. The icons to the right allow the user to confirm the selection, highlight the Asset in the Asset Manager, and remove the selection.
The assigned of the Animation.
The previously assigned of the Animation.