Let’s say I want to make a plane with a turret
The problem is, that the turret’s bullet lag behind the plane
The way the turret works is that it creates a “bullet” that moves every frame based on it’s velocity
However, adding the plane’s velocity to the bullet velocity doesn’t fix the problem, or atleast how I’ve implemented it
Use of LinearVelocity for bullets? If they are models that is.
Have you tried playing around with FastCast for the plane gun
Is the plane faster than the bullets velocity?
Your post isn’t very clear but I think you mean the bullets are firing from behind the actual barrel of the gun, due to the plane’s speed? I’ve experimented with plane and weapon systems using FastCast and I struggled with this for a while, but I eventually found a solution.
You need to get the AssemblyLinearVelocity of the plane and add that to the position of where your bullet is firing from.
local velocity = planeModel.Seat.AssemblyLinearVelocity --you can reference any part in the plane model, it doesnt have to be the seat
velocity /= 4 -- divide it otherwise it will be too big and the bullet will be firing from in front of the plane. use trial and error to get the right number to divide by
bulletFirePosition = gunBarrel.Position + velocity -- add the velocity to the position where the bullet is firing from