VisualPinball.Engine
VisualPinball.Engine copied to clipboard
Handle kicker holes in playfield
Currently the playfield's material is cut-out, meaning that if there's no texture, it's opaque. This results in the kickers being virtually invisible. Here's a textureless playfield in Visual Pinball:
...which renders like that in Unity:
In most cases this shouldn't matter, since playfields are textured, and the kicker will be transparent.
A possible solution to implement the same behavior as Visual Pinball is to cut out the geometry of the playfield with a library like triangle.net.
look into using triangle.net with unity :
https://github.com/garykac/triangle.net
here are two c# unity files I created myself while using this exact library to make playfields with holes in them.
The Unity VectorGraphics package has triangulation support. It uses LibTess.net behind the scenes. https://docs.unity3d.com/Packages/[email protected]/manual/index.html