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

BG - Removing a Grabbable component should not auto-remove other components #6298

Open
j-conrad opened this issue Sep 28, 2023 · 1 comment
Labels

Comments

@j-conrad
Copy link
Contributor

Description
When adding a Grabbable component to an object, the Rigidbody and Physics Shape components get added automatically.
This is generally a good and helpful thing.
However, when removing the Grabbable component, it also automatically removes Rigidbody and Physics Shape which is often undesired.
It is common to want to remove the Grabbable component yet keep the rest of the components intact.

To Reproduce
Steps to reproduce the behavior:

  1. Add a Rigidbody and Physics Shape components to a cube.
  2. Add a Grabbable component to the cube.
  3. Remove the Grabbable component
  4. The Rigidbody and Physics Shape components get removed as well.

Expected behavior
Removing a Grabbable component should leave other components alone.

Hardware

  • Device: Desktop
  • OS: Windows
  • Browser: N/A
@j-conrad j-conrad added bug needs triage For bugs that have not yet been assigned a fix priority Behavior Graphs labels Sep 28, 2023
@j-conrad j-conrad added the P2 Address when able label Oct 5, 2023
@j-conrad j-conrad removed the needs triage For bugs that have not yet been assigned a fix priority label Nov 8, 2023
@Exairnous
Copy link
Contributor

Exairnous commented Nov 8, 2023

The current behavior is actually the expected behavior and has to do with how dependencies are managed. The BG RigidBody and BG Physics Shape components are dependencies of the BG Grabbable component and so are added/removed with the BG Grabbable component as one complete package. The same relationship exists between the Waypoint component and the Networked component or the Audio and Audio Params components. So while I understand the want for not removing the other components, this is going to take some design work to allow (assuming we stick mainly to the current dependency paradigm, which I think we should). The first thought that springs to mind is to add a drop down menu to the remove button with an option to ignore dependencies, but then what do you do if someone does that on a Waypoint component and the Networked component gets left behind? Such an option might work better if applied to soft dependencies as mentioned here: Hubs-Foundation/hubs-blender-exporter#247 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants