Need help rotating gameobject to certain angle with tween

Please see the example Phaser 3 Template (forked) - CodeSandbox

I need to rotate the logos around the button to certain angle(say 30 degree) with tween using phaser action

I am using action so that the logo does not change its rotation

Currently the tween duration, rad angle are somehow inter dependent. The duration should not impact the angle of rotation.

Please help

The problem is that you are not targeting any property of the Circle object. Your code is just running it for a duration of time, and every frame it will call the update(). Ideally you should target some sort of property with a min and max and then the Tween object will calculate the steps in-between and do the rest.

Btw another problem with the current code is that the amount of calls to update() will vary depending on the frame rate of the device it’s running on. Because phone or laptop screens can have different frame rates 60hz or 120hz or 144hz etc.

Not entirely sure how you should do something like this in Phaser3 though. Maybe you’re better off using a Group or a Container ?

You can add the logo’s as children of the Group and then Tween on some property of the group, although when you target the angle property with something like angle: {min:0, max: 30} then it will probably rotate each individual child. So yeah I don’t know.

Lets wait for better approach.