The '''AuthorityTimeBase''' component allows for fine-grained control over the world time with a certain speed and with respect to a given offset.
The '''AuthorityTimeBase''' component allows for fine-grained control over the world time with a certain speed and with respect to a given offset.
Line 13:
Line 14:
== Usage ==
== Usage ==
The output of the component is the current world time (as a [[Type:Double|Double]]) multiplied by the <code>BaseSpeed</code>, minus the <code>_actualOffset</code>.
The output of the component is the current world time (as a [[Type:Double|Double]]) multiplied by the <code>BaseSpeed</code>, minus the <code>_actualOffset</code>.
Line 22:
Line 24:
== See Also ==
== See Also ==
* [[ProtoFlux:World Time Double]]
* [[ProtoFlux:World Time Double]]
* [[ProtoFlux:World Time Float]]
* [[ProtoFlux:World Time Float]]
* [[ProtoFlux:Estimated Master Clock Error]]
* [[ProtoFlux:Estimated Master Clock Error]]
[[Category:Components:Utility{{#translation:}}|Authority Time Base]]
[[Category:Components:Utility]]
[[Category:Components{{#translation:}}|Authority Time Base]]
Offset of the time base from the current world time. Can be written to or driven perfectly fine.
Usage
The output of the component is the current world time (as a Double) multiplied by the BaseSpeed, minus the _actualOffset.
The output of the component is accessed by sourcing the component itself. To write to the current time of the component, you write to said source. When writing to the component source, _actualOffset is automatically updated to reflect the correct time. When writing to BaseSpeed, _actualOffset is automatically updated to keep the same time. Writing to _actualOffset does not affect any other fields.
Examples
An example that displays the currently computed time, allows it to be set back to 0 and that sets the speed to go forward (+1) or backward (-1) in time