Author Topic: Preventing firing animation from moving projectiles  (Read 820 times)

I've been improving the default gun to get experience with weapons and there's something really weird going on. I'm using getMuzzlePoint(slot) to find the gun's location, but in automatic mode it makes the bullets higher than it should because the gun points up during the firing animation. How do i prevent this from happening?

In the guns code, find the onFire function and remove the playThread line or change it.

In the guns code, find the onFire function and remove the playThread line or change it.
I know about that, I want to know how to adjust the bullet position so the animation doesn't affect it.

I know about that, I want to know how to adjust the bullet position so the animation doesn't affect it.
When is is onFire, store the muzzlepoint's position while it isn't animated in a variable. Use the variable as the spawnProjectile position. I think this might be a little buggy, though.

When is is onFire, store the muzzlepoint's position while it isn't animated in a variable. Use the variable as the spawnProjectile position. I think this might be a little buggy, though.
The player's position changes muzzlepoint.

Fire the projectile before playing the animation.

I know about that, I want to know how to adjust the bullet position so the animation doesn't affect it.

Add a vector to the position value.