Rotate something around a point, but keep it facing the same direction (SOLVED)

I was never good at maths, and it has been my undoing.

How can I get a GO to rotate around a point, but keep it facing in the same direction?

You’d have to apply an extra rotation to the object, in the opposite direction, around its center point.

2 Likes

You got it Karl. But that doesn’t work as you expect it to.

Right now I have a parent GO with a child GO. The child GO is displaced so it’s 200 pixels north relative to the parent GO, and the parent GO is rotating, which means the child rotates in a circle with radius of 200. Applying a rotation to the child GO in the opposition direction just makes it stay still, and applying a rotation to the child GO in the same direction just makes it go faster.

Rotating the child GO will rotate it around its center (0,0,0). Are you sure it’s not the sprite in the child GO that is offset?

1 Like

@sicher, that was it. Thanks, team!

edit: hey, that means I was right about the maths, and only failed on the attention-to-detail!

2 Likes