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

in Engine by (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

+4 votes
Best answer

Have you tried this?

$child.global_rotation = 0.0
by (1,412 points)
selected by

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.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.