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

Angle seems to switch from + to - at an odd place #570

Open
pixelzoom opened this issue Sep 14, 2023 · 0 comments
Open

Angle seems to switch from + to - at an odd place #570

pixelzoom opened this issue Sep 14, 2023 · 0 comments

Comments

@pixelzoom
Copy link
Contributor

pixelzoom commented Sep 14, 2023

In ArmPositionSoundGenerator, address this workaround:

      // determine if the new angle crossed over one or more 'sound points' since the last angle
      if ( this.fullyEnabledProperty.value && previousAngle !== null ) {
        numClickSoundsToPlay = Math.abs( Math.floor( previousAngle / binSize ) - Math.floor( angle / binSize ) );

        //TODO https://github.com/phetsims/balloons-and-static-electricity/issues/570 This is a temporary workaround for an issue where the angle seems to switch from + to - at an odd place
        if ( numClickSoundsToPlay > NUM_SOUND_POSITIONS / 2 ) {
          numClickSoundsToPlay = 0;
        }
      }
pixelzoom added a commit to phetsims/john-travoltage that referenced this issue Sep 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant