- Home /
OnTriggerEnter/Exit not working
function OnTriggerEnter () {
soundScript.ControlSound(true, fadeTime);}
function onTriggerEnter(){
laps++;}
Those are from two different scripts. The top one works when the car enters it, but the bottom one does not. They both are set up near identically: Both box colliders, both have isTrigger checked, neither has a rigidbody. The thing is, the bottom script just will not trigger at all for enter or exit, yet there seems to be no reason for it. I even moved the game object with this script attached to a different area to make sure that it wasn't because it was inside another collider with isTrigger checked, and that didn't work.
Answer by Kith · Jul 20, 2011 at 06:37 AM
The O in OnTriggerEnter has to be Capitalized :-)
fml. Its things like this that make me hate my life. I really just spent 3 hours on this :(
Lol you get used to it...eventually. If that solved the problem, can you go ahead and mark the answer as correct? Thanks!
@$$anonymous$$ith, Awesome, thanks. I would never have figured it out on my own. 2 hours spent on this. Capitalized function names...