Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice

Question Rigidbody vibrating on ground after collosion URP

Discussion in 'Physics' started by wikice, Feb 1, 2021.

  1. wikice

    wikice

    Joined:
    Oct 8, 2020
    Posts:
    2
    Hi,

    I'm making a pushable cube, the cube has a box collider and a rigidbody. When It falls down to the ground the physics working just fine, but when I collide with my character after the collosion when nothing happening It starts vibrating just like in this old video. Not always occours but when It is, If I push a little more It usually stops vibrating.



    The strange thing that It's only occours in URP, I made the same in the built-in 3D and the cubes never vibrates.
     
  2. diXime

    diXime

    Joined:
    Oct 2, 2018
    Posts:
    162
    Hello,
    Could it be that your objects are exactly at floor level? It looks like they are colliding repetitively.
    I know it seems like a dirty workaround, but to see more clearly into the problem could you raise them .1 above ground? They will start falling (if gravity is enabled) when you start play mode but my hypothesis is that they should stop vibrating.
    Sadly, I can't quite understand why that problem would occur only in URP, since the rendering pipeline doesn't seem to interact with the physics engine. Maybe it is a rendering issue I'm missing.
     
  3. wikice

    wikice

    Joined:
    Oct 8, 2020
    Posts:
    2
    The cubes are exactly at the floor level because at the begining they are all falling down to the ground. They are vibrating AFTER I push them with another object (after collide) and move a little bit.
    Non of the interpolate, collosion detection etc settings helps. It's a really old problem in unity (the video is 6 years old).
    Don't know why It's only in URP.
     
  4. diXime

    diXime

    Joined:
    Oct 2, 2018
    Posts:
    162
    I would go around the problem by introducing a distance limit (like <=.02f) in the code that controls that cube collision with the ground. I know it's dirty but I remember seeing this sort of things in good practices.