Previously only the main camera node activated eventboxes. This was a bad fit for i.e. races vs. the finishing line.
The process of invoking the event boxes was inverted - instead of searching an event box for the camera node, all event boxes close to the actor are searched for a hit with any node. Hits are recorded and next time the recorded colliding node is checked first.
I checked performance impact on Auriga race under Debug. There seems to be no noticeable FPS drop.
Code changes:
Actor::CalcForcesEulerCompute() - call to UpdateBoundingBoxes() moved here from CalcNodes(). Added call to CalcEventBoxes().
Actor::CalcEventBoxes() - searches and records hits with eventboxes, as described above.
Collisions::nodeCollision() - no longer processes event boxes, the parameter was removed.
Previously only the main camera node activated eventboxes. This was a bad fit for i.e. races vs. the finishing line.
The process of invoking the event boxes was inverted - instead of searching an event box for the camera node, all event boxes close to the actor are searched for a hit with any node. Hits are recorded and next time the recorded colliding node is checked first.
I checked performance impact on Auriga race under Debug. There seems to be no noticeable FPS drop.
Code changes: