VRTK_InteractGrab Precognition Bug/Fix
See original GitHub issueIn VRTK_InteractGrab::Update() the grabPrecognitionTimer continuously grabs until the timer ends. If you grab and release before the timer ends however, it will not let go and the object will be stuck to your hand.
Proposed Solution: Disable the timer after we’ve successfully grabbed an object.
Change:
if (grabPrecognitionTimer > 0)
{
grabPrecognitionTimer--;
if (GetGrabbableObject() != null)
{
AttemptGrabObject();
}
}
To:
if (grabPrecognitionTimer > 0)
{
grabPrecognitionTimer--;
if (GetGrabbableObject() != null)
{
AttemptGrabObject();
if (GetGrabbedObject() != null)
{
grabPrecognitionTimer = 0;
}
}
}
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
VRTK_InteractGrab
An object can be grabbed if the Controller touches a game object which contains the VRTK_InteractableObject script and has the flag isGrabbable set...
Read more >VRTK_InteractGrab
Grab Precognition : An amount of time between when the grab button is pressed to when the controller is touching an Interactable Object...
Read more >VRTK_InteractGrab
The Interact Grab script is attached to a Controller object within the [CameraRig] prefab and the Controller object requires the ; An object...
Read more >VRTK_InteractableObject
VRTK_BaseGrabAction - A Grab Action mechanic for determining how to manipulate the Interactable Object when grabbed by the secondary interacting object. Script ...
Read more >VRTK_BaseGrabAttach
Inspector Parameters. Precision Grab: If this is checked then when the Interact Grab grabs the Interactable Object, it will grab it with precision...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Lol I’m a noob I’ll make it timing based too 😃
fixed with https://github.com/thestonefox/SteamVR_Unity_Toolkit/commit/b43b66b44e7696fbb7fb0c1c0ba34b24d38a5263