Answer the question
In order to leave comments, you need to log in
How to make OnCollisionEnter work without Rigitbody?
Tipo OnCollisionEnter does not work, if there is no Rigitbody on some object, then it does not work.
Code on one of these objects
private void OnCollisionEnter(Collision collision)
{
Debug.Log("Gucci");
}
Answer the question
In order to leave comments, you need to log in
Is there a need to not use Rigidbody on both bodies? I think in order to check whether the bodies collided one of them should be able to move, of course, no one bothers to move the body using Translate, for example. Rigidbody will not do anything bad, even if you do not want the bodies to be physical, the Rigidbody component has constraints in the inspector, you can limit the degrees of freedom there. And if you click all the checkboxes there, you get a completely non-physical body with a Rigidbody. So it doesn’t work without a Rigidbody, as I understand it, due to the fact that it is in it that the item responsible for detecting collisions is located.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question