Skip to content

Instantly share code, notes, and snippets.

@kingthrillgore
Created March 28, 2023 23:10
Show Gist options
  • Save kingthrillgore/31be130a3e9dcfbd5eda7307853b32ee to your computer and use it in GitHub Desktop.
Save kingthrillgore/31be130a3e9dcfbd5eda7307853b32ee to your computer and use it in GitHub Desktop.
Interact method
func interact(interact := false):
# Return anything hitting the raycast collider
print("Interact thrown")
var collider = interact_collider.get_collider()
if collider != null:
if collider.is_in_group(group_for_interactions):
print("Player is facing an interactive")
emit_signal("throwing_interactive")
collider.interact()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment