Skip to content

Add nudge unit - #12

Open
freezy wants to merge 1 commit into
masterfrom
feature/nudge
Open

Add nudge unit#12
freezy wants to merge 1 commit into
masterfrom
feature/nudge

Conversation

@freezy

Copy link
Copy Markdown
Member

This PR adds a Nudge Visual Scripting unit for table logic.

  • Adds a new Pinball > Nudge unit.
  • Exposes Angle and Force inputs.
  • Calls Player.Nudge(angle, force) and continues graph flow through the output trigger.

This lets Visual Scripting tables trigger the same player nudge path used by the engine-side nudge implementation.

@freezyfreezy self-assigned this Jul 5, 2026
@greptile-apps

Copy link
Copy Markdown

Greptile Summary

This PR adds a Visual Scripting node for triggering player nudges. The main changes are:

  • New Pinball > Nudge unit under Runtime/Nodes/Nudge.
  • Angle and Force value inputs with control-flow ports.
  • Runtime call from the node to Player.Nudge(angle, force).
  • Unity metadata for the new folder and script.

Confidence Score: 4/5

The new node depends on the resolved engine package exposing the exact Player.Nudge API.

  • The node structure matches existing Visual Scripting unit patterns.
  • The compile path can break if the referenced Player type does not provide a compatible two-float Nudge method.
  • No security issue was identified in the changed code.

Runtime/Nodes/Nudge/NudgeUnit.cs

Important Files Changed

FilenameOverview
Runtime/Nodes/Nudge/NudgeUnit.csAdds the new NudgeUnit node and wires it to the external Player.Nudge API.
Runtime/Nodes/Nudge.metaAdds standard Unity folder metadata for the new node directory.
Runtime/Nodes/Nudge/NudgeUnit.cs.metaAdds standard Unity script metadata for the new node class.

Reviews (1): Last reviewed commit: "visualscripting: add nudge unit" | Re-trigger Greptile

return OutputTrigger;
}

Player.Nudge(flow.GetValue<float>(Angle), flow.GetValue<float>(Force));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1External Nudge API Coupling

Player is provided by the referenced VisualPinball.Unity assembly, so this new call requires that package version to expose a compatible public Nudge(float, float) overload. If the resolved engine package lacks that exact API or uses a different signature, the Visual Scripting runtime assembly will fail to compile when this node is added.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@freezy