Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Interactable Rigidbody state isn't managed correctly #2038
Steps to reproduce
Case 1: The interactable is still kinematic on release as it was before grabbing
Case 2: The interactable follows the interactor as it's being grabbed
Case 3: The interactable is unsnapped from the snap zone.
Case 1: The interactable goes back to being non-kinematic on release even though it's initial state was kinematic because the logic is always forcing it off.
Case 2: The interactable doesn't move because it needs to be non-kinematic for the rigidbody tracking to work but no kinematic state is changed.
Case 3: The interactable won't unsnap, because on snap the kinematic state is changed to be kinematic but the unsnap never resets the kinematic state to what it originally was.
I think a potential good approach to this would be don't actually attempt to remember the kinematic state of the actual rigidbody but have a held state elsewhere that OnEnable copies the state of the rigidbody Kinematic state, but from then on, this state is used to set the Rigidbody Kinematic state.
This means that at any point someone can manually update this cached state to allow for a different state to be set.