+2 votes

Hey, started on the 3.1 tutorials (https://docs.godotengine.org/en/3.1/getting_started/step_by_step/instancing.html). Ran into some problems in the first one about instancing.

Basically, changing a property of an instance also changes the value of the original, and thus, all the other instances.

I tried this in 3.0.6 and there it worked as intended. I haven't done any changes to the settings that the tutorial hasn't told me to so can't really say I know what's up with that.

in Engine by (17 points)

1 Answer

+3 votes
Best answer

This is due to the new PhysicsMaterial feature. Rather than each node having its own "Bounce" property, it's contained in a PhysicsMaterial resource. This means that you can save and duplicate these physics values easily without having to add them individually. However, Resources are shared between instances so this means that unless you choose "Make Unique" on it, changing a value on one object will change it on all of them.

The tutorial is in need of some clarification to reflect this new behavior.

by (20,379 points)
selected by

Resources have the option to "make local to scene" too, which is the same as making unique, but affects all instances which may not be desired on most resources.

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.