Hi guys,
The new release which was released some time ago has broken the scoring in my game,
In this version, (using the older engine version it was working correctly). I even updated to the latest version of Ammo.
Old build (Working correctly)
but in this latest one, the scoring is bugged.
If you try to land the ball inside the rings, the first one will work correctly while the below one will not.
I found the culprit are the trigger colliders, and this is how I am calculating where the ball landed (as they can be dynamic in size from the API):
I have cylinder trigger colliders with the biggest one of the outer circle, and I am keeping a stack and onTriggerEnter I push that trigger colliders number in the stack while onTriggerLeave I pop out the number from the stack hence the top most number in the stack gives me the ring number of where the ball landed, and if its empty it didnt land in any of the rings.
What currently is happening is this in the Logs if I run with the new engine and try to land in Ring 2:
This is printed in the console:
In Ring 5
In Ring 4
In Ring 3
Out Ring 5
Out Ring 4
Out Ring 3
While on the older build this printed:
In Ring 5
In Ring 4
In Ring 3
In Ring 2
And as ring 2 was the top most element in the stack I would know that the ball was in ring 2, but now its messed up.
ScreenShot of the wrong scenario, the ball is in Ring 2, while the triggers printed the following log:
C mean circle
In C5
In C4
In C3
Out C5
Out C4
Out C3
Stack is empty so No points scored! (log came)
Capture.PNG|690x324
In the older version,
This printed:
In C5
In C4
In C3
In C2
And since C2 was the top most element, I would give him 200 score.
@will I would request to get this fixed as soon as possible as we have to release the game soon.
I can add you to the project.
Thanks.