ProtoFlux:Playback Drive: Difference between revisions

From Resonite Wiki
m add to category
m fix types
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{#Invoke:ProtoFlux|GenerateUI
{{#Invoke:ProtoFlux|GenerateUI
|Name=Sample Object Animation Track< T>
|Name=Playback Drive
|Category=Assets
|Category=Media
|Inputs=
|Inputs=
[
[
{"Name":"StartDrive", "Type":"Impulse"},
{"Name":"StartDrive", "Type":"Call"},
{"Name":"StopDrive", "Type":"Impulse"},
{"Name":"StopDrive", "Type":"Call"},
{"Name":"ForceResync", "Type":"Impulse"},
{"Name":"ForceResync", "Type":"Call"},
{"Name":"Target", "Type":"SyncPlayback"},
{"Name":"Target", "Type":"SyncPlayback"},
{"Name":"NormalizedPosition", "Type":"float"},
{"Name":"NormalizedPosition", "Type":"float"},
Line 23: Line 23:
|}}
|}}


Is Playing is a node that will take a [[Type:SyncPlayback|SyncPlayback]] and allow you to start or stop driving it to a set of provided playback settings and values. This node does the driving in a non networked fashion, which essentially makes the provided SyncPlayback no longer synced while IsDriving ([[Type:Bool|bool]]) is true. When ForceSync ([[Impulses|Call]]) is impulsed, The node will try to sync the current animation position that the local user sees with everyone else in a session. (See [[Impulses]] for what a local user on an Impulse means) If ForceSync ([[Impulses|Call]]) is called and normalized position does not have an input, it will do nothing.  
Playback Drive is a node that will take a [[Type:SyncPlayback|SyncPlayback]] and allow you to start or stop driving it to a set of provided playback settings and values. The driving of the SyncPlayback is non networked.


{{Stub}}
== Inputs ==
 
=== StartDrive ([[Impulses|Call]]) ===
 
Starts driving the Target ([[Type:SyncPlayback|SyncPlayback]]) in a non networked fashion, which essentially makes the provided Target ([[Type:SyncPlayback|SyncPlayback]]) no longer synced until StopDrive  ([[Impulses|Call]]) is called.
 
=== StopDrive ([[Impulses|Call]]) ===
 
Stop driving the Target ([[Type:SyncPlayback|SyncPlayback]]), making it networked again.
 
=== ForceResync ([[Impulses|Call]]) ===
 
When this is impulsed, The node will try to sync the current Target ([[Type:SyncPlayback|SyncPlayback]]) position that the local user sees with everyone else in a session. (See [[Impulses]] for what a local user on an Impulse means) If this is called and NormalizedPosition ([[Type:Float|float]]) does not have an input, it will do nothing.
 
=== Target ([[Type:SyncPlayback|SyncPlayback]]) ===
 
The Network Synced Playable that will become un-networked via being driven by this node.
 
=== NormalizedPosition ([[Type:Float|float]]) ===
The position to drive Target ([[Type:SyncPlayback|SyncPlayback]]) to from 0 to 1.
 
=== Maximum Position Error ([[Type:Float|float]]) ===
The the max amount the position on Target ([[Type:SyncPlayback|SyncPlayback]]) can vary from NormalizedPosition ([[Type:Float|float]]).
 
=== Speed ([[Type:Float|float]]) ===
The a multiplier for the playback speed of Target ([[Type:SyncPlayback|SyncPlayback]]).
 
=== Play ([[Type:Bool|bool]]) ===
If the Target ([[Type:SyncPlayback|SyncPlayback]]) should be playing. (default true if normalized position is given and moving)
 
=== Loop ([[Type:Bool|bool]]) ===
 
If the Target ([[Type:SyncPlayback|SyncPlayback]]) should loop. May clash when providing NormalizedPosition ([[Type:Float|float]])
 
== Outputs ==
 
=== OnStartDrive ([[Impulses|Continuation]]) ===
 
When StartDrive ([[Impulses|Call]]) is impulsed and it can drive Target ([[Type:SyncPlayback|SyncPlayback]])
 
=== OnStopDrive ([[Impulses|Continuation]]) ===
 
When StopDrive ([[Impulses|Call]]) is impulsed and this node was driving Target ([[Type:SyncPlayback|SyncPlayback]])
 
=== OnResync ([[Impulses|Continuation]]) ===
 
sends an impulse when ForceResync ([[Impulses|Call]]) succeeds.
 
=== IsDriving ([[Type:Bool|bool]]) ===
 
If the Target ([[Type:SyncPlayback|SyncPlayback]]) is currently driving. (Aka StartDrive ([[Impulses|Call]]) was called but not StopDrive ([[Impulses|Call]]) yet.)
 
== Examples ==
<gallery widths=480px heights=480px>
File:ProtoFlux_example_driving_playable.webp|An example of a drive playback telling an animation to only play the first 3 seconds using world time and math nodes.
</gallery>


<i> This node needs standardization with [[Example ProtoFlux Node]] </i>


[[Category:ProtoFlux:Media]]
[[Category:ProtoFlux:Media]]

Latest revision as of 21:15, 9 February 2024

Playback Drive
StartDrive
OnStartDrive
StopDrive
OnStopDrive
ForceResync
OnResync
Target
IsDriving
NormalizedPosition
MaximumPositionError
Speed
Play
Loop
Media

Playback Drive is a node that will take a SyncPlayback and allow you to start or stop driving it to a set of provided playback settings and values. The driving of the SyncPlayback is non networked.

Inputs

StartDrive (Call)

Starts driving the Target (SyncPlayback) in a non networked fashion, which essentially makes the provided Target (SyncPlayback) no longer synced until StopDrive (Call) is called.

StopDrive (Call)

Stop driving the Target (SyncPlayback), making it networked again.

ForceResync (Call)

When this is impulsed, The node will try to sync the current Target (SyncPlayback) position that the local user sees with everyone else in a session. (See Impulses for what a local user on an Impulse means) If this is called and NormalizedPosition (float) does not have an input, it will do nothing.

Target (SyncPlayback)

The Network Synced Playable that will become un-networked via being driven by this node.

NormalizedPosition (float)

The position to drive Target (SyncPlayback) to from 0 to 1.

Maximum Position Error (float)

The the max amount the position on Target (SyncPlayback) can vary from NormalizedPosition (float).

Speed (float)

The a multiplier for the playback speed of Target (SyncPlayback).

Play (bool)

If the Target (SyncPlayback) should be playing. (default true if normalized position is given and moving)

Loop (bool)

If the Target (SyncPlayback) should loop. May clash when providing NormalizedPosition (float)

Outputs

OnStartDrive (Continuation)

When StartDrive (Call) is impulsed and it can drive Target (SyncPlayback)

OnStopDrive (Continuation)

When StopDrive (Call) is impulsed and this node was driving Target (SyncPlayback)

OnResync (Continuation)

sends an impulse when ForceResync (Call) succeeds.

IsDriving (bool)

If the Target (SyncPlayback) is currently driving. (Aka StartDrive (Call) was called but not StopDrive (Call) yet.)

Examples