+1 vote

in one of my enemy scenes i threre is something like this:

  • area2d
  • -collision polygon
  • -texture progress

i want to texture progress move with area2d but dont rotate with it

how i can do that?

Godot version 3.4
in Engine by (56 points)

1 Answer

0 votes
Best answer

The pretty straight forward but not-so-elegant way is to set its rotation to -parent.rotation. You also have the option of setting it as toplevel and updating its position manually. However, the more principled way would probably be to structure the scene such that the graphical elements that need to be rotated are separated from the graphical elements that don't:

- node2d
  - area2d (gets rotated)
    - collision poly
  - texture progress
by (1,305 points)
selected by
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 Frequently asked questions and 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 [email protected] with your username.