Hello peeps,
quick question, I am trying to increment my lap counter plus one when I enter a trigger but it increments my lap by three for some reason,
if (col.gameObject == triggerCounter)
{
laps++
}
Could someone give me some insight on why this is happening?
Thanks for the reply, my bad I have one for the actual code, but here is the issue. I hit the trigger that is keep up with the laps but when I enter the trigger instead of it incrementing just the one lap it does 4 laps.
Why would the ontrigger function increment it +3 everything that I have seen suggests that it should do it only +1.
That is everything in the on trigger function.
Ok I see the missed semicolon, I never thought that I was entering the trigger multiple times but that is how it is seemingly using it, how does this function work then, shouldn’t be that when you normally pass through the trigger it detects that you are in and out depending on your code instead of saying that this object in broken into bits and we are counting every bit of the object if that makes sense?