Raycast for some reason is always 90º off

Godot Version

4.3

Question

image
image

the default for look at is right I think. you just need to add 90º to it. something like:

$BlockRangeRayCast.rotate(PI/2)


now it only rotates

it rotates because it in the loop
try put it in some where like onready

this is func _ready():
image

this is without anything messing with the raycast (which is normal):
image
the problem is when I try to point it at the player

so the reason why the Raycast is rotating is because yes.
If someone is going trough this, I did this and it fixed:

func _process(delta):
	look_at(get_global_mouse_position())
	$".".rotation -= deg_to_rad(90)

after looking at the mouse it then rotates 90º

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.