Raycast Question

The enemy moves as indicated by the blue line, but the raycasts will always remain in the position indicated by the red lines

Is there a way to make them rotate with the rotation of the sprite?

1 Like

yes just
Always → Extractor (This rotation) → (angle)Raycast

3 Likes

So if you did what I did in my lighting example inside the line object would be

(Starting Value + Rotation) - FOV(Field of View)/2
and then that would go into the “Angle” input of the ray cast

This method does take an extra object (for the line), but it does it all for you without having to set up multiple ray casts

3 Likes

This worked perfectly, thanks!

1 Like