Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Picking up large objects launches avatar out of space

Discussion in 'AR/VR (XR) Discussion' started by andyperkins, Aug 16, 2019.

  1. andyperkins

    andyperkins

    Joined:
    Jan 10, 2019
    Posts:
    6
    Hi, a very strange glitch/issue:

    I have an enclosed space with a large box and a small that I can pick up and place on a table. When I pick up the small vase, it looks great, very little to no jittering. When I pick up the large box, however, it starts shaking violently and my avatar/hands get launched through the wall and into the skybox where I fall forever (I can hold on to the shaking box and when I release it it flies away via gravity).

    Sorry for the imprecise language, but I really don't know how to describe this. I am using localavatarwithgrab embedded in ovrplayercontroller (I figured out how to make this work by creating a copy of the localavatarwithgrab prefab, and then opening it up and removing the camera that is redundant with the camera in overplayercontroller, works perfect, can move and grab:)).

    Has anyone seen this, or have any idea what Im talking about?

    Thanks,

    C
     
  2. andyperkins

    andyperkins

    Joined:
    Jan 10, 2019
    Posts:
    6
    That should be "a small vase".
     
  3. andyperkins

    andyperkins

    Joined:
    Jan 10, 2019
    Posts:
    6
    Here is video of the glitch. Notice that once you grab the objects in the space, as soon as I try to move with the left thumbstick, the object starts bouncing and clips me through the wall unless I drop it or move in a different direction.
     
  4. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    1,450
    Your issue is that your player controller is using a rigidbody from what I can see?

    I would advice using the unity Charactercontroller component to move your player around and to call Simplemove at all times in update even if the player isn't moving so that it receives the effects of gravity.

    It's always worth searching the forum for similar issues like this one where the solution I suggest is already suggested too https://forum.unity.com/threads/controller-with-a-collider-is-pushing-me-around.501671/
     
  5. andyperkins

    andyperkins

    Joined:
    Jan 10, 2019
    Posts:
    6
    Hi Rob, Im not sure what you mean.

    Im using OVRPlayerController for movement, and I have added LocalAvatarWithGrab (modified to remove the camera that is in that prefab) to be able to move around and pick up objects. OVRPlayerController does not have any rigidbody. The only rigidbody I can find is in the hand models, but those have to be there in order to pick things up.

    What I am really looking for is a solution to be able to walk around my space and pick things up. If there is a better way to do it, Ill change it. The OVRPlayerController +LocalAvatarWithGrab was my solution to the problem, but is probably why im getting the glitch in the video I posted.

    Is there a better way to move around and have hands that can pick things up?

    Also, I did try to search, but didn't have the best language to describe the issue:)

    Thanks,

    A
     
  6. MissBarbara

    MissBarbara

    Joined:
    Sep 14, 2019
    Posts:
    1
  7. arfish

    arfish

    Joined:
    Jan 28, 2017
    Posts:
    782
    ROBYER1 likes this.
  8. andyperkins

    andyperkins

    Joined:
    Jan 10, 2019
    Posts:
    6
    Hasn't anyone solved this issue? Is it not possible to walk around and pick things up? This seems like an obvious issue.
     
  9. arfish

    arfish

    Joined:
    Jan 28, 2017
    Posts:
    782
    Everyone has already solved this. Destroy the rb in the object you pick up, and optionally recalculate the combined weight and position for your players rb.
     
  10. andyperkins

    andyperkins

    Joined:
    Jan 10, 2019
    Posts:
    6
    Ok, last question before i dig in: does destroying the rigidbody require coding, or is it something built into the rigidbody element?