Nodes/ComfyUI S4Motion/đź’€Motion Rotation
ComfyUI Node

đź’€Motion Rotation

Spin a layer over time, from one angle to another

By S4MUEL-404·Created about a year ago·Updated 11 months ago· 4
đź’€Motion Rotation
    • Rotation
    â—„default_rotation0â–ş
    â—„target_rotation0â–ş
    â—„duration1.00â–ş
    â—„delay0.00â–ş
    â—„motion_curvelinearâ–ş
    â—„inversefalseâ–ş
    â—„loopfalseâ–ş

    A layer that just sits there is a static image. đź’€Motion Rotation is how you give it a spin - from one angle to another over a duration, with easing, delay, and loop controls. It's one of the S4Motion effectors, which means it only does something when you plug its Rotation output (an S4_ROTATION_EFFECTOR) into the rotation_effector socket on đź’€Motion Config. On its own it computes per-frame values; Motion Config renders them.

    The controls are the standard effector set:

    • default_rotation - starting angle in degrees (-360 to 360).
    • target_rotation - where it ends up.
    • duration - how long the turn takes, in seconds.
    • delay - seconds before it starts.
    • motion_curve - linear, ease_in, ease_out, ease_in_out. linear is fine for a mechanical turn; ease_in_out for a logo flip that should feel weighted.
    • inverse - rotate out and back to the start.
    • loop - keep repeating for the whole timeline.

    Two practical notes. First, effector rotation adds to Motion Config's static rotation field, so a default of 0 here means "leave the base rotation alone." Second, the range is capped at ±360 degrees per node, but nothing stops you stacking a full turn as an ease_in_out target of 360 - the node interpolates degrees, so 0→360 reads as one complete rotation, not "no visible change." That's the trick people miss on the first try.

    Mechanically it's the same easing engine as every other effector: the node builds a per-frame rotation list using bezier curves when the bezier package is installed, with smoothstep/cubic fallbacks when it isn't, and Motion Config applies it each frame during compositing. There's no separate pivot-point control on this node - rotation happens around the layer's alignment point as handled by Motion Config, so if you need to spin around a corner instead of the center, you adjust positions there.

    Install

    cd ComfyUI/custom_nodes/
    git clone https://github.com/S4MUEL-404/ComfyUI-S4Motion.git
    pip install -r ComfyUI-S4Motion/requirements.txt
    

    or ComfyUI Manager → "S4Motion" → install → restart.

    The whole pack flies under the community radar (zero reddit mentions), so the examples/Rotation.json workflow in the repo is your wiring reference. Small node, one job: make things turn.

    Categoryđź’€S4Motion

    Inputs (7)

    NameTypeDefaultDescription
    default_rotationFLOAT0-360–360—
    target_rotationFLOAT0-360–360—
    durationFLOAT1.000–30—
    delayFLOAT0.000–30—
    motion_curveCOMBOlinear4 options: linear, ease_in_out, ease_in, ease_out
    inverseBOOLEANfalse—
    loopBOOLEANfalse—

    Outputs (1)

    NameTypeDescription
    RotationS4_ROTATION_EFFECTOR—