How can I lower or stop raycast lag?

…?

This just seems like a problem within a problem within a problem. That’s going to be on you to figure out at the end of the day. If your question at hand is how you can make the visual effects as well as the ‘eye’ properly face the player, the answer is to handle it on the client, as all visual effects, etc… should be.

If damage then seems inaccurate then you can have the server handle damage (as well as cast its own rays), then have the client send its raycast results to the server, compare the servers raycast to the clients raycast, if it’s within a sane range then you can apply damage.

1 Like

This is actually a pretty fair thought. I was thinking in terms of my own use case where we literally predict the player’s position but I guess my use case is different because it’s an archer and a projectile, not a ray. Doing two comparative rays between the server and the client as well as divorcing the visuals from the function is actually a more appropriate solution.

My bad. :sweat_smile:

1 Like