I have a Empty object which spawns the bullets that is parented to the Player’s hand as he runs. They problem is that I would like to have the bullets shoot in a straight line (unaffected by small up/down or left/right movement) as he moves. The movement is part of the animation clips and not behaviour I have implemented.
I was wondering if there is a way around this by parenting it a certain way or damping the motion, etc?
Ended up settling on a method that parents the spawners to the Player’s feet and dynamically changes the Local position of each bullet spawner object as the Player changes from a running to a hovering position. The positions would be worked out before hand and held in Vector3 objects in the script. This completely fixed any bobbing movements.
To help others that may need something similar, the gist of the code was a follows;
// If hovering..
if (hoverFlag)
// Position the Spawner higher
transform.localPosition = hoveringPosition;
// If running..
else
// Position the spawner lower
transform.localPosition = runningPosition;