maybe the title isnt 100% accurate, but as you can see in this video, when I strafe, or move my cursor too fast, the projectile kind of “lags” behind the crosshair position, is this because the actor is getting created before the crosshair is being moved? Maybe I should switch over to hitscan and draw a cosmetic bullet? But I feel like the problem will persist if I do that
sorry let me upload some better screenshots
this is the portion to get the vectors for the line trace
and this is a better quality of spawning the projectile
You are not taking your motion into account when predicting the place where the bullet should be.
There was an old post on the forum a while back that tackled this problem, can’t seem to find it though so I only have a screenshot of it
Ah so I should add player movment as an additional vector when making a transform?
Yes and you need to take into account the distance from the weapon to the cross-hair and the speed of the bullet
It’s a similar situation to the moving target scenario except the location of the “enemy” in this case is just stationary relative to your actor.
But in the original calculations, they used the projectile speed in relation to the enemy velocity, but in this case that would be 0, right?
Also maybe its not with the transform, but with the hit trace end vector
Maybe the velocity (position change over time) of the cursor could be a replacement factor for the moving enemy. Just theory crafting for now.