0 votes

In my project I have a player node who has a child which is an area2D
What I want to be able to do is change the area2D's offset from the player at will in either the area2D script or the players. I'm a complete noob at Godot and I'm sure the answer is obvious. Thanks!'

in Engine by (12 points)

1 Answer

0 votes

A node's position property is relative to its parent. If your Area2D's position is set to (50, 50) and the player moves, it will remain that distance offset from the player.

So just change the position of your Area2D to achieve what you want.

by (18,565 points)

How to dismiss this offset without affecting Area2D ?

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.

Categories