Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Object in launched sim may change orientation if time is stepped back #457

Closed
Tracked by #841
KatieWoe opened this issue Sep 29, 2022 · 4 comments
Closed
Tracked by #841

Comments

@KatieWoe
Copy link
Contributor

Test device
Dell
Operating System
Win 11
Browser
Chrome
Problem description
For phetsims/qa#838.
When a sim is launched, the step back time control is available. However, it "steps back" to the location it was at when launched. If the sim is paused, this should mean nothing happens. However, the orientation of the object is changed.
Steps to reproduce

  1. Go to the Model screen and the Planet and Satellite scene
  2. Play the sim briefly
  3. Pause the sim
  4. Launch the sim
  5. In the launched sim, hit the step back button and observe the satellite

Visuals
changeorientation

@arouinfar
Copy link
Contributor

Thanks @KatieWoe.

@samreid this looks like a problem with the rotationProperty of the object. It's easiest to observe with the satellite, but it's a general problem.

Here's an example following @KatieWoe's steps to reproduce, but with the PlanetMoonScene.

rotationProperty = -1.92... radians in Studio and the initial configuration of the Standard PhET-iO Wrapper:
image

rotationProperty resets to zero when pressing the Restart button in the Standard PhET-iO Wrapper:
image

It seems like the rotationProperty is excluded from the state saved by the Restart button, which may explain why the button is enabled by default in the Standard PhET-iO Wrapper. I would expect it to be disabled because the initial state in the wrapper should be identical to the state restored with the Restart button.

@arouinfar
Copy link
Contributor

It seems like the rotationProperty is excluded from the state saved by the Restart button, which may explain why the button is enabled by default in the Standard PhET-iO Wrapper.

I compared to the 1.5 version, and the Restart button is disabled in the Standard PhET-iO Wrapper, as I would expect. However, if you play or step forward to enable the restart button, and then press restart, it will restore a state with the rotationProperty = 0.

samreid added a commit that referenced this issue Oct 5, 2022
@samreid
Copy link
Member

samreid commented Oct 5, 2022

Fixed and ready for cherry-pick

@KatieWoe
Copy link
Contributor Author

KatieWoe commented Oct 6, 2022

This seems fixed in RC.3

@KatieWoe KatieWoe closed this as completed Oct 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants