Created
March 28, 2023 23:10
-
-
Save kingthrillgore/31be130a3e9dcfbd5eda7307853b32ee to your computer and use it in GitHub Desktop.
Interact method
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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