两个物体我想检测是否发生碰撞,但是不让物体发生碰撞的运动(不位移,轨迹速度不变),然后销毁其中一个物体,但是OnCollisionEnter2D这个函数是碰撞运动大于检测的,虽然检测到了,但物体总会发生运动偏移,有没有只检测碰撞,但不发生运动的函数或者方法? 谢谢各位大佬!
You can set a Collider2D to be a trigger which tells you which other Collider2D it contacts. If you need a ContactPoint2D then you'll need to use Rigidbody2D set to a body-type of Kinematic and use full kinematic contacts as I described in your previous post here.