(SOLVED)Raycasting ray is slow

I have a sprite that, when it collides with the player, makes an enemy chase the player, by firing a ray to check if it has line of sight. however, the ray has been acting odd, the range seems off, the enemy is almost blind when rotating, and it feels like it has some sort of delay. this makes me think that, for whatever reason, the ray might be slowed somehow. this does not make sense, please help

Use shape painter to actually see how ray is being cast

2 Likes

thanks for helping me fix this! after further examination, the range issues were caused by the vision object width and height being unequal. the other jank was because I used the raycast to position event instead of the correct raycasting event

1 Like