I rotate a node (with a inexperienced picture sprite for straightforward viewing) containing little one nodes (known as Dot, with crimson colour, collider2D and rigidbody2D). I modify the Rotation property and all Dots additionally change. I wish to accomplish that in code, nonetheless solely the blue half rotates.
I rotated each methods:
tween(new Vec3(0, 0, 0))
.to(3, new Vec3(0, 0, 360), {
easing: "cubicIn",
onUpdate(goal?: any) {
wheelDot.eulerAngles = goal;
},
})
.begin();
and
tween(this.wheelDot)
.to(
3,
{
angle: this.wheelDot.angle + 360,
},
{
easing: "cubicIn",
}
)
.begin();
Each of the above codes simply rotate the inexperienced half and the crimson dots keep in place.
edit: I discovered if I dropped RigidBody2D, the crimson dots moved. How can I nonetheless use RigidBody2D and nonetheless rotate?
You possibly can strive altering the sort to Animated.