Raycast not working from the get-go

Godot Version

4.3.dev6
Godot_v4.3-dev6_win64_qU53Uo4ulx

Question

In the video, you can see that the raycast only detects the one way platform after the player has jumped and fallen to the ground (the raycast turns red when its colliding with something).

Why is that? Why doesn’t the raycast detect a collision from the the get-go? How can I fix this behaviour?

@onready var ray_cast: RayCast2D = $RayCast2D

func _physics_process(delta: float) -> void:
	player_state_machine.physics_process(delta)
	print(ray_cast.get_collider())

Here’s the Inspector of the RayCast2D node.

Check hit from inside

1 Like

Thanks a lot! Didn’t see that one.

1 Like