Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Prevent objects from pushing each other

Discussion in 'Physics' started by Meatb0y, Oct 23, 2019.

  1. Meatb0y

    Meatb0y

    Joined:
    Jan 25, 2015
    Posts:
    28
    Hello everyone,
    In my game I have npcs that can move and I would like to make sure that when they collide with the player, neither the player nor the npcs are pushed but still collide. Is there a way to do this simply with the new unity 2Drigidbodies or do i have to code it myself ?
     
  2. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    2,032
    Sure but can you explain what you mean by "still collide". If there's no collision response then what does "collide" mean to you? Do you want to get a collision callback?
     
    Last edited: Oct 24, 2019
  3. Meatb0y

    Meatb0y

    Joined:
    Jan 25, 2015
    Posts:
    28
    I mean that when the player collide with a npc the player can't move anymore in that direction (and the npc can't move in the direction of the player either) but they don't push each other away.