unity3d – Understanding what causes collision events
docs.unity3d.com/2021.1/Documentation/Manual/CollidersOverview.html
While getting some basic collision detection set up I referenced the official docs on the matter. Unfortunately, this left me more confused than when I started.
I made a simple scene. In this scene I added a sphere with a sphere collider (non-trigger) and a Kinematic Rigidbody. A script moves this object on the X axis when played.
I then created cube with a box collider (non-trigger). This object has no rigidbody or scripts attached.
Looking at the chart in the documentation linked to above, this should fall under the Static Collider and Kinematic Rigidbody Collider interaction, which should not create collision events.
However, if I add a OnCollisionEnter()
to the sphere, it will call this method when the objects collide. Without physics they both continue on their way, otherwise oblivious to each other.
My concern then is that either the documentation isn’t entirely correct or I have a fundamental misunderstanding of what it is telling me.
What’s going on here?
Read more here: Source link