Godot Version
4.2
Question
I have a 3d person character controller and im trying to set up interactions. But my raycast wont work if i child it to my spring arm it only works if i child it to my character collision mesh.
The camera is a child of the spring arm and the raycast is a child of the camera but i cant seem to get it to work.
Here is the code for the Interaction on the raycast
extends RayCast3D
@onready var interact_prompt_label : Label = get_node(“InteractionPrompt”)
func _process(_delta):
var object = get_collider()
interact_prompt_label.text = “”
if object and object is InteractableObject:
if object.can_interact == false:
return
interact_prompt_label.text = "[Interact] " + object.interact_prompt
if Input.is_action_just_pressed("interact"):
object._interact()