Two objects : A Cube made by Unity with a Box Collider and a Rigidbody.
A Laser, as shown in the picture (Line Renderer for visual, Box Collider for OnCollisionEnter).
As shown, the laser enters the cube but won’t trigger the previous code (and send the cube flying away).
How are you moving the laser? If you’ve got the line renderer and the box collider on a single game object, make sure the line renderer has the world space option switched off, otherwise the box might not move in sync with the line.
The laser has a line renderer, with “Use World Space” off. It also has a box collider. I use a transform.Rotate in order to make it move around his Y axis.
The cube has a rigidbody (with is kinematic off) and a box collider.
Look like I needed to give the laser a rigidbody (Is kinematic do not matter but I set it off so it would not fall). But why a rigidbody was required ?