Repository navigation
Conversation
A curved trigger's top polygon is triangulated, and its triangles reported contacts, so the contact solver held the ball up on the trigger's hit height. Its edges and corners were solid too. A ball in a shooter lane would roll on the switch like on a shelf and lose most of the plunger's shot when launched from its edge. The triangles of a trigger now follow the non-rigid branch of VP's Hit3DPoly: they only report crossings, never a contact, with a small tolerance so a crossing on a seam between two triangles isn't missed. Like VP's Hit3DPoly, the polygon has no edge or vertex colliders.
[Medium impact] The PR appears safe to merge, with the previously reported test gap addressed. SummaryTrigger polygons now let balls pass through while still reporting entry and exit.
The previously reported test gap is addressed by
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A curved trigger triangulates its top polygon into triangle colliders, plus line and point colliders for its edges and corners. The triangles reported contacts, so the contact solver held the ball up at the trigger's hit height, and the edges and corners were solid as well.
On Terminator 2, the shooter lane switch sits right in front of the auto-plunger. The ball rested on top of the switch, about 20 units above the playfield, and rolled sideways on it. When the launch button was pressed before the ball had settled, it was shot from the edge of that shelf, clipped the lane guides and didn't make it back onto the playfield. The plunger's impulse itself was identical in all cases.
Changes
TriangleCollider: the triangles of a trigger follow the non-rigid branch of VP'sHit3DPoly::HitTest. They only report when the ball crosses them (hit or unhit) and never make a contact. A small barycentric tolerance makes sure a crossing on the seam between two triangles of the polygon isn't rejected by both.ColliderUtils.Generate3DPolyColliderstakes anonlyTrianglesflag, and the trigger generator sets it. VP'sHit3DPolyhas no edge or vertex colliders either.TriggerPolygonTests.Not changed: a trigger's side walls (
LineCollider, non-rigid) can still report a contact in rare cases, which matches VP'sLineSeg::HitTestBasic.Testing