Nearest Multiple Spikes
Nearest Multiple Spikes will move the motor in either direction to the closest multiple of Factor plus Offset. Put in other words:
NewTargetPosition=NearestMultiple(Factor+offSet)
The NearestMultiple(Factor+offSet) is found by calculating the NewForwardPosition and the NewReversePosition, then selecting which one is closest to the CurrentMotorPosition and setting that as the New Target Position.
PC= Current Position
R↑= Round Up
R↓= Round Down
F= Factor Value
S= Offset Value
∣PC−(R↑[PC/F]∗F+S)∣<?∣PC−(R↓[PC/F]∗F+S)∣
If Yes, NewTargetPosition=NewForwardPosition
NewForwardPosition=Round↑(CurrentMotorPosition/Factor)∗Factor+Offset
If No, NewTargetPosition=NewReversePosition
NewReversePosition=Round↓(CurrentMotorPosition/Factor)∗Factor+Offset
Nearest Multiple Spikes use the ↔ icon in the Spike List to indicate that they are a nearest multiple.
Change The Type

To change the type of spike, select the spike in the Spike List and then select nearest multiple from the type dropdown menu.
Changing The Factor

To change the factor double-click in the Factor column and give it a new factor.
Changing The Offset

To change the offset double-click in the Offset column and give it a new offset.
Example

In this example the turntable is running until an actor says their line then we want to stop the turntable and center it up as quick as possible. To do this we will use the nearest multiple spike to allow the turntable to run either direction to get back to center. The factor is set to 360 degrees (one full revolution) and the offset is set to 180 degrees (center).
Last updated
Was this helpful?