As the title says, my gun’s position move’s to the right when it animates.
Not animating:
Animating(moves to the right):
Shotgun’s scale factor is 0.01, only applying one animation to it (idle).
I can tell it acually moved because when I look at it not playing the game
(with animation on) it’s where I placed it but when I do press play it
moves.
This is related to animation of the root node. The root node of your weapon is animated, so when you play animation it assigns position to the root of your weapon.
Several solutions:
- Do not animate root node of the weapon
- Parent your weapon under another GameObject and move parent GameObject instead and let animated your weapon as it does now.
- Add another root in your 3d model in 3dsMAx - when Unity finds that your object has more than one root, then it places extra parent under them both automatically (basically #2 happens) and this way you can move the model the way you want.
I personally would go for option #3 (or number #1 if you’re trying to save amount of nodes).