- Home /
Do you have to have a rigidbody component for collision detection?
If I have a cube for example and a load of box colliders, do I have to add a rigidbody to my cube for it to be detected?
The problem is I don't want to make the cube a physical object, I just want to keep it very simply controlled from script but not use physics.
At this point you need only one box collider and no rigidbody if you are planning to not use physics..
You are not forced to use physics as movent, because even the first person controller is not using physics so the awnser for your question is no, you do not need a rigidbody do you can collide with things
Read the $$anonymous$$anual...
http://docs.unity3d.com/ScriptReference/Collider.OnCollisionEnter.html
Note that collision events are only sent if one of the colliders also has a non-kinematic rigidbody attached.
well that's what I thought, but here everyone is telling me something different.
also how is that workable? what if I want some player controlled object that I don't want to control by applying forces?
Answer by Paprik · Jul 20, 2014 at 08:26 PM
You don't have to have a rigidbody, but from what I can tell, it's recommended (there are some references in the API as well).
I've run into a problem when not using a rigidbody: Making OnTriggerEnter execute on startup. And I imagine there might be more, but you can probably work around everything.