0 votes

So, when changing an instanced scene's property cause all previous instanced scenes instead of the latest one.
GIF Here

Here's the simplified instancing code I use

var my_scene = preload("res://myScene")
m = my_scene.instance()
m.position = position
Godot version Godot 3.3
in Engine by (82 points)

what is "physical_property" comming from?

I think you share this object in every projectile (as reference). So if you change this values every bullet changes its direction.

ahh, that's probably why. The dictionary is referencing instead of getting value.

How to fix this now?

Stop using a dictionary probably a no from me, there's a ton of variables inside that need to often pass around and use in the game. So, duplicate the dictionary. Thanks, again?

Please log in or register to answer this question.

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.