Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document that CollisionShape(2D) instances share a resource, and that 'Local to Scene' can override this #4647

Open
Error7Studios opened this issue Feb 14, 2021 · 1 comment
Labels
area:class reference Issues and PRs about the class reference, which should be addressed on the Godot engine repository enhancement

Comments

@Error7Studios
Copy link

Error7Studios commented Feb 14, 2021

Your Godot version:
3.2.4 RC 2

Issue description:
It isn't obvious that instanced CollisionShape nodes will share a resource, or why.
The Make Sub-Resources Unique checkbox seems to have no effect on this issue.
Something like this should probably be added at the top of the CollisionShape and CollisionShape2D docs:

For performance reasons, all instanced CollisionShape(2D) nodes share the same resource.
To override this and create unique resources for each instance, check the Local to Scene box in the inspector.

Issues:
godotengine/godot#38066
https://www.reddit.com/r/godot/comments/ljd49i/instanced_objects_interact_as_one_object/
https://godotengine.org/qa/95271/give-unique-size-to-different-collisionshape2d-instances
godotengine/godot-proposals#317

URL to the documentation page (if already existing):
https://docs.godotengine.org/en/stable/classes/class_collisionshape.html
https://docs.godotengine.org/en/stable/classes/class_collisionshape2d.html

@samuel-walker
Copy link

Just to motivate this a bit – I just found this issue from Google and it helped me solve my problem! It seemed like a good idea to make a single character scene for a multiplayer game, and just instance one scene for each player. However, I was noticing the CollisionShape2D of multiple instanced character scenes were being animated together! I somehow forgot the resource would be shared. Mentioning this in the docs or tutorials as reminder for new users like me would be great.

@skyace65 skyace65 added the area:class reference Issues and PRs about the class reference, which should be addressed on the Godot engine repository label Dec 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:class reference Issues and PRs about the class reference, which should be addressed on the Godot engine repository enhancement
Projects
None yet
Development

No branches or pull requests

3 participants