- Home /
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 !
Answer by GamerJoHo · Sep 08, 2017 at 02:48 PM
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."
Answer by horatiu2004 · Sep 08, 2017 at 02:56 PM
@dasfuhrer here are some possible solutions:
Make sure that the Collider is set to IsTrigger for your cube
Make sure you have a Collider on your car and is not a trigger
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.
thanks for you reply , i checked all of that , and its true , so the probelm consist
Answer by Kironde-Namusanga · Sep 12, 2017 at 11:23 AM
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.