This site is currently in read-only mode during migration to a new platform.
You cannot post questions, answers or comments, as they would be lost during the migration otherwise.
0 votes

I'm losing my mind to remote transform 2d. I honestly didn't understand this node, I just use it mindlessly, can anyone explain to me what is it's function etc.?

Godot version 3.3
in Engine by (385 points)

1 Answer

+9 votes

I'll try to explain it to you. The RemoteTransform2D will push its transform to the node you set in its property remote_path. Also note that in the update menu, you can choose which transform are pushed to the remote node. By default, position, rotation and scale will be pushed.

Let's say you want to follow the position of NodeA but not its rotation. If you set NodeB as a child of NodeA, you'll inherit all of its transforms, so position, rotation and scale.

What you want to do, is to make RemoteTransform2D the child of NodeA and set the remote_path to be NodeB. Under update, you would disable rotation. Of course, NodeB should not be a child of NodeA, but a sibling.
That way, the RemoteTransform2D will send its position to NodeB, which is inherited by NodeA, but won't send its rotation.

The final structure would be something like this:

    |__ NodeA
        |__ RemoteTransform2D
    |__ NodeB

I hope this is clear, let me know if you have any question.

by (643 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 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.