Search Unity

OVR Grabble causing Player to move backwards once object is grabbed

Discussion in 'VR' started by brichard0625, Jul 28, 2019.

  1. brichard0625

    brichard0625

    Joined:
    Dec 18, 2016
    Posts:
    26
    Just trying to figure out whats going on here. When I grab an object and being to move it around my camera/player starts moving backwards. This happens with any object and even happens in the Oculus Distance Grab Demo Scene. Anybody had this issue?
     
  2. brichard0625

    brichard0625

    Joined:
    Dec 18, 2016
    Posts:
    26
    Figured out what was happening, the item is colliding with the ovr player character controller, not sure how to avoid this.
     
  3. brichard0625

    brichard0625

    Joined:
    Dec 18, 2016
    Posts:
    26
    Ok so this had been solved and pretty silly on my part that I didn't think of this. Basically the solution is to reduce the radius of the character controller.
     
    MiguelAmbrizFoxconn likes this.
  4. AdrellaDev

    AdrellaDev

    Joined:
    Jul 30, 2018
    Posts:
    15
    You can also make sure the physics layers of the object and the player don't collide by going to Project Settings > Physics and unchecking the box that has both physics layers.
     
    viknesh2020, sadsad_mba and V-J like this.
  5. UnbelievableFlavour

    UnbelievableFlavour

    Joined:
    Aug 20, 2019
    Posts:
    4
    For all the people still fighting this problem. My solution was like this:
    Create 3 layers.
    • Player.
    • Level.
    • Grabbables.
    Then go to Project Settings > Physics.
    You will see a lot of checkboxes with layers interacting with each other. Make sure the checkbox where Player collides with grabbables is turned off.

    Now make sure all your level elements are in the 'level' layer.
    Make sure the player is in the 'player' layer.
    And make sure the grabbable game objects are in the 'grabbables' layer.

    For the final touch. To make sure you are actually able to interact with stuff in the grabbables layer. Set your game object where you grab with(gameObject with OVRgrabber) in the 'grabbables' layer.

    This should make sure the grabbables will interact with the level and your hands but not the player! Voila :) Hope this is of help to someone.
     
  6. keithfrechette

    keithfrechette

    Joined:
    Oct 24, 2019
    Posts:
    4
    Wonderful, bartzaalberg! That helped me a whole bunch! :) I've been driving myself batty with trying to figure this out, wondering why the heck Oculus hasn't stepped up to address the issue, either by code changes or documentation, especially since their own demos have this issue. :eek: Thanks for your post.
     
  7. histired

    histired

    Joined:
    Feb 15, 2019
    Posts:
    3
    OK, so I've encountered the same problem and realized that this only happens also when I grab nothing. I know that this thread has been revived so many times but this is for others encountering the same issue and do not know how to fix it.

    So it had something to do with the collider because of how it pushes in the opposite direction of where my hand is to the player collider. But, hand Colliders are triggers?

    Fortunately, Upon further investigation, there is one script that messes with the Colliders: "Hand.cs"

    Under Update()
    Comment these two lines out:
    Code (CSharp):
    1. bool collisionEnabled = m_grabber.grabbedObject == null && flex >= THRESH_COLLISION_FLEX;
    2. CollisionEnable(collisionEnabled);
    These lines apparently checks to see if (player grabbed nothing) do (enable collision on hands)
    Which when in game causes the hands to collide with the player, pushing the player back > hands being positioned to player... > pushing the player back > repeat...
     
  8. Corysia

    Corysia

    Joined:
    Mar 14, 2018
    Posts:
    108
    I have a non-coding solution in my Example. The advantage to my method is that you don't have to worry about the changes if you upgrade library code.
     
  9. ArtisV

    ArtisV

    Joined:
    Jun 25, 2013
    Posts:
    9
    An question regarding the same OVRPlayerController. I use the same Oculus Distance grab demo scene. And when I enable the HMD Rotates Y feature* on OVRPlayerController, the hand position goes out of sync when turning head in VR scene. Does anyone has same issue, and how do you fix it?

    (*This feature enabled should rotate the OVRPlayerController object Y axis basing on Head movement, so that movement forward stick is always in direction where you are looking).
     
  10. FrostyBrain

    FrostyBrain

    Joined:
    Feb 19, 2020
    Posts:
    1
    I used some of the other solutions in this thread and had some success but after this last idea I tried, everything worked perfectly. What I did was replace the standard sphere collider on the OVRPlayerController with a separate Sphere with a radius of 0.05 that was parented to the respective hand anchor. Then I replaced the Grab Volume with a reference of the new sphere. This also fixes any issues of grabbable pushing you back or throwing you into the air
     
  11. awesomepower

    awesomepower

    Joined:
    Dec 11, 2019
    Posts:
    1
    how do i this
     
  12. snoopyonline78

    snoopyonline78

    Joined:
    Jan 20, 2023
    Posts:
    4
    Dear all, thanks a lot for your help! I changed now the layers, and the problems with running backward while grabbing an object is fixes, but another problem now is here: While i'm grabbing an object, and walk forward, the object is moving forward too along the Ray Line.
    Why the object can't remain simply in my hand while i'm walking? Somebody knows why? Thanks a lot!