The problem with the interpolation of a bullet fired from a moving object

Hello. I’m trying to get a smooth shot of a moving car. When the car is at rest (that is, just standing still) and shooting, everything works correctly (with the exception of a small delay at the very beginning of the movement of the bullet, but this is not critical). But when the car starts to move and at the same time fires a shot, the impression is created that the bullet spawns in front of the car and the position is interpolated a little back, but then aligns. This is clearly visible in the video I am attaching.

Please, if anyone has encountered this, or knows how to solve the “bullet interpolation in reverse direction” when shooting in motion.
I have been trying to solve this problem for about two weeks now. I would greatly appreciate your help in solving this problem.

Here are the NetworkTransform settings and the code that moves the bullet.

public class NetworkBullet : NetworkBehaviour
    {
        [Inject] private BulletBehavior bulletBehavior;
   
        [SerializeField] private float speed;
        [SerializeField] private float damage;

        private void Update()
        {
            transform.Translate(Vector3.forward * (speed * Time.deltaTime));
        }
   
        public override void OnNetworkSpawn()
        {
            base.OnNetworkSpawn();
            bulletBehavior.Initlialize(this);
        }
    }

Link to video

9722029--1389922--demo.gif

Video doesn’t play for me.

The code doesn’t show how the bullet gets spawned. Perhaps the initial position is off. If the firing position is right in front of a car and a client car is moving forward, you should notice that the rocket actually spawns a little inside the car depending on lag.

Try disabling Interpolation for debugging to really see what’s going on.

I have uploaded the video to my google drive, please try again to access it. Regarding the code that instantiates the bullet, I don’t think it will be useful. After all, when the car is not moving, there are no visual problems with the movement of the bullet.

https://drive.google.com/file/d/1rBWytSJ2Y-abEHSkfsg0zM8rO7oO-gU5/view?usp=sharing

The bullet appears exactly in front of the car when it moves forward, but in the following frames it seems to be approaching the car (this should not be the case, because the speed of the bullet is higher than the speed of the car). Please let me know if the video is not available for you again.

P.S. With interpolation off, the bullet moves correctly and does not get close to the car after being shot. But it appears very far ahead of the car and moves in jerks.