OnCollisionEnter is not called in unity

前端 未结 6 1901
走了就别回头了
走了就别回头了 2021-01-04 06:10

I checked nearly every answer for this, but those were mostly simple errors and mistakes. My problem is that OnCollisionEnter is not called even when colliding whith other r

6条回答
  •  死守一世寂寞
    2021-01-04 06:58

    Here is what I do:

    1. Make sure that object you wish to collide with target has non-kinematic rigidbody and mesh collider. My hitter object is a cube and just change its collider to mesh collider
    2. On mesh colider inspector make sure you enable convex. Please see more mesh collider inspector detail here

    Now your OnCollisionEnter works. I hope this helps you.

提交回复
热议问题