Search Unity

Make rigidbody not affected by other rigidbodies, but still collide and have gravity

Discussion in 'Physics' started by joshcamas, May 18, 2019.

  1. joshcamas

    joshcamas

    Joined:
    Jun 16, 2017
    Posts:
    745
    Hello!

    I'm wanting to make a rigidbody that isn't affected by other rigidbodies (aka won't be pushed around by them but instead stay still and collide with them), but still have gravity and fall.

    Sounds complex, and probably not possible... but just making sure there isn't an obvious trick I'm missing here.

    The backstory for why I need this is that I'm having a mobile app where you can drag items around, but I don't want the other items to be pushed by the currently dragged item. However these non-dragged items still need to react to gravity.
     
  2. Edy

    Edy

    Joined:
    Jun 3, 2010
    Posts:
    1,497
    I don't understand the case entirely, but the available tricks and techniques that seem related to me are:
    Maybe you could achieve what you're looking for using a combination of these.
     
    joshcamas likes this.
  3. SparrowsNest

    SparrowsNest

    Joined:
    Apr 6, 2017
    Posts:
    1,792
    @Edy is spot on (as usual), if you want to flail around a rigidbody object and not have it wreck up the place make the rest of the level kinematic, if you still need something dynamic in the scene you could maybe give everything a huge mass and the dragged object Mathf.epsilon making it barley exert any force on collision, but it can affect stuff house of card style i believe.
     
    joshcamas likes this.