Registry Mirror
Skip to content

Any way to have the rope respect time_scale? #39

Open

Description

@fremachuca

Hey y'all,

I change the time_scale of my game as an accessibility option, but unfortunately the rope behaves completely differently instead of just being in "slow motion".

Also, thank you for the amazing plugin!

Cheers!

Activity

  1. mphe commented on Sep 11, 2025

    @mphe
    Owner

    Unfortunately that is a limitation of this addon.
    It uses Verlet integration for simulation rather than Euler integration like common physic engines.
    The reason is that Verlet integration is very simple and efficient.
    A downside is that it isn't fully FPS independent, as it determines velocities by taking the position difference of the rope points between last and current frame.
    That means, when changing the framerate (delta) the movement steps become larger or smaller, which in turn results in faster or slower velocities and thus completely different behavior and not just slow-motion or fast-forward.
    Hence, the only framerate independent parts of the simulation are gravity and damping.
    And since time_scale is essentially a delta multiplier, it doesn't work as expected.

    So, there is no clean solution. I'll think about it, maybe I find a simple hack to approximate the effect of time_scale.
    Otherwise, you're out of luck unfortunately.
    You can try to tweak gravity, friction and constraint iterations to simulate time_scale, but that's all you can do for now.

  2. mphe commented on Sep 12, 2025

    @mphe
    Owner

    I gave it some thought and I think the only way to achieve this is by implementing custom tick management.
    Depending on time_scale, rope updates would be skipped every few frames (time_scale < 1.0) or would run twice every few frames (time_scale > 1.0).
    This way the simulation can be sped up or slowed down without affecting the behavior (theoretically).
    If frames were skipped, interpolation must take place to keep the rope animation smooth.
    In that case, special care has to be taken to keep tools like RopeHandle working properly.

    It isn't insanely difficult to implement, but it's still quite a bit of work.
    I'll keep this issue open. If more people need this or when I get a burst of motivation the feature will come.
    But at the moment this has no priority for me I'm afraid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions