ShootOnInteract.cs is a script that attaches to a Raycast3D node. With it, the object (most likely a gun) you are holding can shoot static objects, and dynamic objects (and even move them around).

Requirements

Shoot On Interact pairs very well with look_at_target, but has extra requirements if you chose to do so:

  • The X component of the local position of the RayCast must be 0
  • Only the Z component of the RayCast target position may be modified, and it must be negative
    • Both of these requirements stem from the math that enables look_at_target to work.

See ShootOnInteract.cs > Exported Variables for inspector variable reference


Last updated: 08-15-2026 21:45