Animated part showing up rotated in game, but fine in blender 2.79 Right first of all I know you're probably thinking it's the games fault... But it's 100% not.
I know this because in call of duty 4 other weapon models are set up the exact same and they work fine. With that out of the way I'll tell you what's wrong.
So I'm using &quot;Blender CoD&quot; add-on for blender which allows me to import/export models in an xmodel_export format which the game uses to convert the model to a usable weapon.
So I have an armature and vertex meshes set up using the same bone structure from a working model I'm adapting as the gun I'm creating (LW3 Tundra from call of duty black ops cold war) is an evolved version of the L96 from various games, in this case battlefield 3.
I'd run into a couple issues at first as I've never really used blender before and I'd probably spend 20 hours learning by myself how to use it.
Issue 1 - solved) The scope wasn't repositioning correctly in blender
so I pressed &quot;Ctrl + a&quot; and set the rest position or something or other.
I solved that and then got the next issue.
Issue 2 - solved) The weapon bolt (cocking device) wasn't in the right place and was to the left.
I solved that by doing the same as I did to the scope.
Issue 3 - unsolved) So after I'd done that I'd set the &quot;rest pose?&quot; Using the same Ctrl + a method. But this time the bolt was still rotated upwards in game, but not blender.
Which I found was weird because I solved every other problem by realizing that something was wrong in blender. I had no problems with the rotation in previous testing, but now it's not going away.
I think one of the reasons this is is because I'd set the rotation with the set to rest pose method. And maybe because the part is animated, it screwed up?
I tried rotating bones, putting them on different parts of the model but no use. Any help would be helpful.
Method I used to fix the scope, except I did it on the meshes, although it seemed to work.
My Rig Changes Position in Edit/Object Mode?
&quot;
I had this same problem too! I tried all of these answers but none helped, I finally figured it out. All you have to do is go into pose mode and select each bone individually(you might be able to select all but I didn't try) and press &quot;Ctrl+A&quot; and apply location, rotation, and scale. If this doesn't help for you I am very sorry. It worked for me.
&quot;
Simple fix, just adjust the part to the incorrect position and apply as rest pose using Ctrl +  A in Pose Mode