The cast_to property takes a Vector2 object. You’re trying to assign an int to it. So maybe the value should be Vector2(0, -150) or Vector2(0, 150)?
Thanks! But for some reason the raycast won’t turn around?
Anastasia | 2020-02-23 18:32
If you need to turn it around, have you tried the rotation() function? E.g. $Raycast2D.rotation(theta), where theta is the desired amount of rotation in radians.