Rotate Around Player while looking forward

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By realvasion

Hello there,

I have a player(asteroid) that have 3 smaller asteroids (shielding player) as a children of player so when I rotate the player the smaller asteroids rotate around player. the problem is that they rotate as well.
what I wanted is that they should rotate-around the player when player rotate but should not change their own rotations; they should look straight. just like image below

Similar effect to the I want:

Orbit around

any help is much appreciated

Instead of having them rotate around the object, maybe you should have them follow a path parented to the player. Making them only move on the path when the player rotates might be tricky, though.

Hope this is helpful.

Millard | 2020-05-13 14:57

Thank you for replying, but there are several other functionality that relay on this, like player angular velocity that accelerate and decelerate base on power-ups. any other Idea?

realvasion | 2020-05-13 16:08

:bust_in_silhouette: Reply From: whiteshampoo

Have you tried this?

$child.global_rotation = 0.0

Yep, this should be what you’re after…

jgodfrey | 2020-05-13 21:31

THANK YOU!!! this is exactly what I wanted.

realvasion | 2020-05-13 23:53