you need to state which 3d program your using for us to help more, in most cases like this its the alignment of the “bone” axis thats at fault. i always align the “X” axis to point along the weapon, it’s been the same process for Unreal Engines for years
Why do i need to rotate it ? I thought the bone supposed to make it so the engine knows what position it looks it and it’s the same location that the exported rifle(Epic’s gun from the shooter example) looking at.
i had the same problem with my weapon , it was facing the wrong direction when imported into unreal , but it was looking right in maya .
What unreal shows you , is the 0.0.0 position of the mesh , and not the skeleton . if you turn on " show skeleton " in unreal , you will see that your skeleton is in the right place , but your mesh is in its 0.0.0 position .
What i did to fix it was putting the mesh into the position i want it to be And zeroing out Translation/Rotation/Scale before binding it to skeleton . this way my models always look right in unreal.