Double Registry per Collision on Lecture "Using OnCollisionEnter()"

Hello, I’m having a problem.
Every time I collide with a wall it registers as 2 hits instead of one.
I have followed precisely the video instructions.
Any ideas on how to solve it?
Thanks in advance.

Hi,

Welcome to our community! :slight_smile:

First of all, log the name of the “other” game object and “this” game object into your console to see which game objects are involed in the collisions. Two messages are not necessarily wrong.

In a collision event, we have two colliders. A non-trigger collider triggers the OnCollision* method, a trigger collider triggers the OnTrigger* method.

If your game object collides with two other game objects, two separate collision events happen.


See also:

Are you using a cube as a player?

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms