ProtoFlux:Get Object Root: Difference between revisions

From Resonite Wiki
m ProbablePrime moved page Get Object Root (ProtoFlux) to ProtoFlux:Get Object Root: Creating protoflux Namespace
m gallery
Line 43: Line 43:
== Examples ==
== Examples ==


[[File:GetObjectRootExample.png | 750px | Two nodes setup showing how to use the Get Object Root ProtoFlux node.]]
<gallery widths=480px heights=480px>
File:GetObjectRootExample.png| Two nodes setup showing how to use the Get Object Root ProtoFlux node
</gallery>


Using this node on a hit collider slot of a Grabbable object with OnlyExplicit set to false you can get the slot containing the Grabbable component which is most likely going to be the object's root, even if the object doesn't have a explicit ObjectRoot component.
Using this node on a hit collider slot of a Grabbable object with OnlyExplicit set to false you can get the slot containing the Grabbable component which is most likely going to be the object's root, even if the object doesn't have a explicit ObjectRoot component.


[[Category:ProtoFlux:Slots]]
[[Category:ProtoFlux:Slots]]

Revision as of 02:04, 10 February 2024

Get Object Root
Instance
*
OnlyExplicit
Slots

Returns the root slot of an object from one slot input which is a child of the specified object.

Inputs

Instance

A slot within the object you want the root of.

OnlyExplicit

If this is true, it will explicitly look for slots which have a ObjectRoot component.

If this is false, it will look for slots containing a component which implements IObjectRoot. These include:

  • LegacyPanel
  • SceneInspector
  • ObjectRoot
  • Grabbable
  • ProtoFluxNode

Outputs

*

Will return a slot being the root of the object.

If no such component is found, the initial slot itself will be returned.

Examples

Using this node on a hit collider slot of a Grabbable object with OnlyExplicit set to false you can get the slot containing the Grabbable component which is most likely going to be the object's root, even if the object doesn't have a explicit ObjectRoot component.