0 votes
  1. Is it possible to rotate a shape2D 20 degrees, and have that be the new 0 rotation for the node?

  2. Is it possible to change the center position of a node?
    Can I make a 10x10 square and have the "center" be (5,3)?

Thank you.

Godot version 3
in Engine by (12 points)

1 Answer

0 votes

Is it possible to rotate a shape2D 20 degrees, and have that be the new 0 rotation for the node?

Every Node2D gets an identity transform by default when created (position zero, scale one, and no rotation). There is no way to change this initial value (but you can change it once created). You could create a scene containing your node, and choose the initial values from here. This scene can act like a "prefab". Next, when you want to create an instance of it, load that scene and instance it, and it will start with the values you configured.

Is it possible to change the center position of a node?
Can I make a 10x10 square and have the "center" be (5,3)?

Which node? It depends what type you are talking about. If it's a Sprite, you can choose where its pivot is by adjusting properties below the Offset category in the inspector. You can also put your node as child of another so the parent will act as pivot.

by (27,896 points)
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.