Skip to content

Time<Physics> pause is delayed by one frame #776

@Pascualex

Description

@Pascualex

From what I'm seeing, unpausing Time<Physics> takes effect immediately, but pausing it is delayed by one frame.

A simplified extract from my logs:

# fixed schedule 1 (already paused)
after FixedPostUpdate, body position: [6.0856233, -7.507883] (same as before)
# fixed schedule 2 (already paused)
after FixedPostUpdate, body position: [6.0856233, -7.507883] (same as before)
# fixed schedule 3
on FixedUpdate, unpause Time<Physics>
after FixedPostUpdate, body position: [5.954998, -7.2947235] (updated)
# fixed schedule 4
on FixedUpdate, pause Time<Physics>
after FixedPostUpdate, body position: [5.824373, -7.081564] (updated)
# fixed schedule 5 (already paused)
after FixedPostUpdate, body position: [5.824373, -7.081564] (same as before)

I would expect the physics simulation to only run one time in this situation, but it seems to have run twice.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-BugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions