Highlights an object (or several objects) in the scene, so that it’s easier to spot. When highlighted, an object has a pulsating glow on the surface.
The node looks like this:
Inputs and outputs:
- Out: executed immediately. The object will continue to be highlighted after this node has finished execution.
- Break: stop highlighting the object.
Parameters:
- Highlight Duration: amount of seconds to highlight the object for. If 0, will highlight indefinitely until Break input is called.
This node is Filtered List node. It is similar to Selection nodes, but does not have selection amount parameter. The Selection Mode is used to set objects that can be grabbed. For object to be eligible for grabbing, it has to have a Rigidbody.
There is always a Target Slot parameter - this can be any collider that has Is Trigger checked. It is recommended to add some visual indication for the slot (outline of an object, ghost, transparent zone, etc). Slot’s GameObject can be disabled, the node will enable it when needed.
The way grabbing system works is that every grabbable object has a list of Requesters, that is, objects that need this item to be grabbable. It can be a slot, trigger or the object itself (in case of free grab). Every time a slot node is called - it adds itself to the list of requesters for the object. Any object can be grabbed as long as the amount of requesters for it is higher than 0. The moment this stops being the case (for example - all slots are slotted) user will drop the item if it is in their hands and it stops being grabbable
Troubleshooting
If you are facing object flickering (z-fighting) during highlight
Highlighting works by duplicating the object behind-the-scenes. However, sometimes that creates a tiny coordinate offset that leads to z-fighting.
To prevent this from happening, ensure that your objects (and all of their parents) have their translation properties (position, rotation, scaling) defined with no more that 2 digits after decimal point.
In other words, if your object (or one of their parents) lists position X as 15.28347333 shorten it to 15.28 and that should fix the problem.