OnCollisionEnter is not called in unity

前端 未结 6 1897
走了就别回头了
走了就别回头了 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:48

    because you misstyped class name of parameter. this makes no error also not works. eg:

    OnCollisionEnter(Collider other) //this is wrong
    OnCollisionEnter(Collision other) //this is correct
    

提交回复
热议问题