Skip to content

Conversation

@samme
Copy link
Contributor

@samme samme commented Mar 31, 2025

This PR

  • Adds a new feature (breaking change)
  • Fixes a bug

I started fixing #7090 and ended up changing the destination argument.

Updates (breaking change)

In Phaser 3's Camera.rotateTo(), when the shortestPath argument was false (the default value), the sign of the radians argument indicated the direction of rotation and the absolute value of the radians argument indicated the destination angle. In Phaser 4, the radians argument is now called angle and represents the destination angle as a signed value. You can use the new functions Phaser.Math.Angle.GetClockwiseDistance() or Phaser.Math.Angle.GetCounterClockwiseDistance() to calculate rotation distances in a specific direction.

Bug Fixes

@zekeatchan zekeatchan merged commit a3afe55 into phaserjs:v4.0.0 Apr 3, 2025
@zekeatchan
Copy link
Contributor

Hi @samme. Thanks for the PR. We have merged it with the v4.0.0 branch. It will be part of the next release. Do test it out and let us know if you encounter any issues.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants