0 votes

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

asked May 13 in Projects by realvasion (17 points)

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.

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?

1 Answer

+3 votes
Best answer

Have you tried this?

$child.global_rotation = 0.0
answered May 13 by whiteshampoo (976 points)
selected May 13 by realvasion

Yep, this should be what you're after...

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

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.