0 votes

I want make a 2d rotlling cube, the axis need always to be right corner, i try to use postion2d as the parent node, but it only can rotate once.

Anyone can help me please!

enter image description here

Godot version 3.2.3
in Engine by (12 points)

1 Answer

0 votes

Not that you can't get it done with a Position2d but what you want might be easier achieved using any node that derives from the Control node as they have the rect_pivot_offset property

So in practice lets say you use a TextureRect

var position = Vector2(0, texture_rect.get_size().x)

know that position will change with each rotation

by (6,876 points)
edited 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.