#Issue with gun system / Fastcast

1 messages · Page 1 of 1 (latest)

cold prairie
#

Working on my own gun system right now and I've came into an issue where there is an offset for the starting position of the ray when the character is moving and simultaneously casting the ray, you can visibly see the ray "lagging behind" in the video when I'm moving. Does anyone happen to know how to fix this issue?

I'm using Fastcast and an attachment inside the model to determine the starting position of the ray.

main jungle
#

i think its just due to the fact that the server thinks the player is in a different spot then they are on the client, cuz of ping :/

#

you could make the bullets on the client to make it look better

sly token
# cold prairie Working on my own gun system right now and I've came into an issue where there i...

You shouldn’t spawn the projectiles on the server. All you need is for the server to calculate the hit and logic of the projectiles, but the physical objects should be cliented. If you’re going for a physics-based system (could look like it due to the projectiles moving so slowly) you would not use raycasting. If its not physics-based you would want to speed up the projectile due to moving targets and desynchronization.

cold prairie