0 votes

So I'm trying to make my player teleport to the place where the ender pearl hit.I'm doing this in 2d btw.

in Engine by (12 points)

1 Answer

+2 votes

connect a signal when the pearl collides, when the signal is triggered set the player's position to the pearl's position

by (430 points)
edited by

you have to reference the player's node not the player's scene that is different the node path in the scene is different from the scenes path in the project res:// is used for files system resources.

but how do I reference a player's node from another scene?

i advise you to watch tutorials or read books on godot because those are a lot of things to cover in the answers

yea you're right, I'll try to learn and figure something out. I'm a total beginner now so I can't really understand basic things. thank you for everything.

you're welcome

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.