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

Copypasting StaticBody2D with shape in scene doesn't make copy of collision shape. #64664

Closed
RedwanFox opened this issue Aug 20, 2022 · 2 comments

Comments

@RedwanFox
Copy link
Contributor

Godot version

4.0dev 0c5f254

System information

Windows 11

Issue description

Copypasted StaticBody2D in scene share CollisionShape2D shape. All collision shapes will reference same subresource.

Steps to reproduce

  1. Create 2D scene
  2. Create StaticBody2D, give it CollisionShape2D with defined shape resource
  3. Copy StaticBody2D subtree several times in scene
  4. Try to resize collision shape - all collision shapes will resize

Minimal reproduction project

No response

@Zireael07
Copy link
Contributor

That's because resources (and shapes are resources) are shared by default for performance reasons.

A couple of proposals have been made to rectify that because esp. for collision shapes this catches people unawares.

@Calinou
Copy link
Member

Calinou commented Aug 20, 2022

Duplicate of #40887 and/or #28246 (same cause).

@Calinou Calinou closed this as not planned Won't fix, can't repro, duplicate, stale Aug 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants