+1 vote

hello i am currently making a game involving a creature and a piece of fruit i recently discovered that you could get the name and subsequently position of an object upon it entering an area however it is not working with instances ( y'know things in different scenes you spawn in unless instances work in the same scene which i highly doubt ) is there anyway you could find the position of an instance ( the fruit ) once it enters the area i am using the onbodyentered function. A huge thank you to anyone that knows this has plauged me for multiple days now.

in Engine by (20 points)

1 Answer

+2 votes

If you have a reference to an instance in a variable (say, the_instance), you can access its position via:

the_instance.position

Is that what you're after?

by (21,756 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.