Error: Too few arguments for "get_collider()" call. Expected at least 1 but received 0. #212
JockeyDragon24
started this conversation in
General
Replies: 1 comment 2 replies
-
Hey, so checking the Godot documentation, I haven't used ShapeCast3D myself, and how you want to solve this depends a bit on what kind of behavior you want to achieve: You could try to just pass 0, so it always just takes the first object it collides with. If your Shapecast uses a wide shape, this might What are you trying to implement here? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Im struggle to find the way to fix the error called 'Too few arguments for "get_collider()" call. Expected at least 1 but received 0.' in this script
class_name InteractionShapeCast
extends ShapeCast3D
signal interactable_seen(interactable)
signal interactable_unseen()
var _interactable = null:
set = _set_interactable
func _ready() -> void:
pass
func _process(_delta: float) -> void:
_update_interactable()
func _set_interactable(value) -> void:
_interactable = value
if _interactable == null:
interactable_unseen.emit()
else:
interactable_seen.emit(_interactable)
func _update_interactable() -> void:
var collider = get_collider()
In this part:
How I gonna fix the error on 'var collider = get_collider()' because I put this code into shapecast3d node with 'extends ShapeCast3D'?
Beta Was this translation helpful? Give feedback.
All reactions