When aiming a gun, I'm having an issue with the tip of the gun always fluttering. I have NO lockon capabilities turned on. As an attached script or marked as "Use Lock On" in the ShooterManager.
Well. Still haven't figured this out. It's obviously a Raycasting issue but just not sure how to get around it. If you shut off "Raycast Aim Target" in ShooterManager & on the weapon (still not really sure why there are 2) you obviously don't have this issue.
In vShooterMeleeInput::UpdateAimPosition(); right before you do aimPosition = hit.point I tried taking the last Aim point and Lerping to this next aimpoint so at least I could smooth it.
var lastAimPosition = aimPosition;
aimPosition = Vector3.Lerp(lastAimPosition, hit.point, Time.deltaTime); I also tried multiplying Time.deltaTime by different values. Although it did smooth it out a little, the only thing it really did was make the gun inaccurate.
I makes sense to move the gun based on what the Raycast hit but there's got to be a way to shoot to the center without moving the gun so much.
Still looking. It'll probably have to be an IK adjustment and I nothing about IK.