Bullets not consistently spawning at muzzle point

Author Topic: Bullets not consistently spawning at muzzle point  (Read 1164 times)

When firing, the weapon I made only spawns the first bullet from the muzzle point, and the rest spawn at the mount point. I suspect this is because I'm trying to animate the muzzle point - is this the case? If not, why could this be happening?

muzzle points cant be animated, it’ll just be at the root position assuming no keyframes after the first exist. unsure why it is firing from mounpoint though - maybe package the fire function and check if it really is being created at the mountpoint or if it just looks like it is

muzzle points cant be animated, it’ll just be at the root position assuming no keyframes after the first exist. unsure why it is firing from mounpoint though - maybe package the fire function and check if it really is being created at the mountpoint or if it just looks like it is
bullets fire from the model origin (0,0,0) if no muzzle point is present
The mount point is most likely at the origin

You can't animate the muzzlePoint or it won't recognize it as being there anymore or something

therefore you should just keep the muzzlePoint at the area of where the muzzle is at resting position even if you have a firing position that moves the muzzle


if you have some sort of super crazy weapon that moves its muzzlePoint like left to right or something you would have to resort to using math to find where the muzzle point would be corresponding to the where you want the bullet created

Thanks! That was exactly the case.

EDIT: I have no idea what's happening that keeps causing this but it's not anything to do with animation, apparently. The muzzle point has no animation, so it shouldn't be resetting to the origin. Muzzle flash and smoke always come out of the right place, but bullets don't spawn there. As a workaround, I'm going to try setting the model up so that the muzzle point is at the origin.
« Last Edit: December 21, 2017, 08:53:21 PM by irrel »

are you sure your onfire script uses the muzzle point?

are you sure your onfire script uses the muzzle point?

Fairly certain. It sets the projectile's initial position to the player's getMuzzlePoint(slot) method.

post the entire image code maybe