on trigger enter not working (with Images) ?

ontriigger enter not working , with this script but in the same project i have another script wich have a call to ontriggerenter and it working , but here not working , i tryed all but nothing done !

101500-prb0.png

101501-prb.png

As far as I remember, you need a collider on the object entering the trigger too.

The OnTriggerEnter documentations first line stats:
“OnTriggerEnter is called when the Collider other enters the trigger.”

@dasfuhrer here are some possible solutions:

  1. Make sure that the Collider is set to IsTrigger for your cube
  2. Make sure you have a Collider on your car and is not a trigger
  3. For more information and configuration see this video tutorial provided by Unity.

As a personal recommendation name your Classes properly using the C# naming standards, it will help you be a better developer.

Hope this totally solves your problem please post back if it doesn’t .
For Trigger Functions to work your object needs to have a rigidbody and a collider to be on the safe side put a rigidbody on both objects and if one doesn’t need to move make the rigidbody Kinematic.