Skip to content
This repository has been archived by the owner on Nov 9, 2023. It is now read-only.

Commit

Permalink
Add Find Grabbable LogiX Node
Browse files Browse the repository at this point in the history
Add Find Grabbable LogiX Node
  • Loading branch information
Xlinka authored Jul 23, 2023
2 parents 24f77cf + c2f22db commit 28b9c5c
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions NEOSPlus/Logix/Interaction/Grabbable/FindGrabbableFromSlot.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
namespace FrooxEngine.LogiX.Interaction
{
[Category("LogiX/Interaction/Grabbable")]
[NodeName("Find Grabbable")]
public class FindGrabbableFromSlot : LogixNode
{
public readonly Input<Slot> Instance;

public readonly Output<IGrabbable> Grabbable;

protected override void OnEvaluate()
{
Slot slot = Instance.EvaluateRaw();
if (slot == null)
{
Grabbable.Value = null;
}
else
{
Grabbable.Value = slot.GetComponentInParents<Grabbable>();
}
}
}
}

0 comments on commit 28b9c5c

Please sign in to comment.