So I'm working on a system to place buildings on terrain. One requirement to place a building is that there be no other objects in the way (from certain excluded layers -- like trees, characters, etc.). So I put a trigger collider on the building game object being placed, to check for the presence of any excluded objects. This check needs to happen constantly, so I use a tick machine. I want to ask Makinom/ORK to do the following, but can't figure out which nodes to use...
"Hey, Makinom, please check if there are any objects from the excluded layers inside the trigger collider, and if yes, set the global boolean variable isObjectBlocking to true. If no objects from the excluded layers are inside the trigger, set isObjectBlocking to false."
How do I make the schematic check for objects inside the trigger collider?
For something like that, you'd need to handle that with 2 Trigger Machines storing/removing the game objects entering/leaving the trigger in selected data (e.g. via object variables on the game object).
In short:
- trigger enter start > stores the object that started the machine into selected data on the game object
- trigger exit start > removes the object from the selected data
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!