Joining meshes whilst keeping current rotations- Blender

Hi,
I’ve modelled a gun and I’m trying to rig it for a view model for source engine. However, when I join the gun mesh to the arm mesh, the gun flips out and breaks the rotations.
Here’s what I mean:

How do I connect the meshes in order to make the gun on the rig without having this happen? Thanks

“Embedding disabled by request”.

As for your issue, try hitting Ctrl-A to apply the rotation before joining.

Sorry, should be fixed now :s

Applying rotations, locations and scale didn’t work. I’m using Blender 2.69 btw.

Hmm. Well at 16 seconds when you selected the gun, I notice you don’t have an Armature modifier. I think that’s part of the problem.

Worst case scenario you could always export them separately and use two $model commands.

Thank you for the help! I’ve managed to compile the model using multiple $model commands, however the rotations of the animations are completely broken. The animations themselves still play somewhat, but the thing is completely glitched out.
Here it is in HLMV

(Don’t mind the broken UVs/textures)

And in Blender:

I’ve tried applying rotations on the specific animations and re-exporting all animations using blender 2.63 (which I used to use before changing to 2.69) to no avail.
This hasn’t happened to any of my other models I’ve made and so far I’ve made 10.
However this one is on the full rig of Gman rather than the HL2 hands that are consistent with Valve’s viewmodels. Is this the problem?
I’ll paste my .qc


$cd "C:\Users\...\Desktop\sten thing\v_sten\2.63\anims"
$modelname "weapons/v_smg1.mdl"
$model "studio" "hands.smd"
$model "studio" "sten_thing.smd"
$model "studio" "clip.smd"

$cdmaterials "models\hands"
$cdmaterials "models\weapons\w_models\smg"
$hboxset "default"
$hbox 4 "ValveBiped.Bip01_L_UpperArm" 0.000  -2.750  -2.750  12.510  1.750  2.250
$hbox 4 "ValveBiped.Bip01_L_Forearm" 0.000  -2.190  -2.380  13.000  1.810  1.620
$hbox 4 "ValveBiped.Bip01_L_Hand" 0.060  -2.000  -1.500  4.060  1.000  2.500
$hbox 5 "ValveBiped.Bip01_R_UpperArm" 0.000  -3.000  -2.250  12.390  2.000  2.750
$hbox 5 "ValveBiped.Bip01_R_Forearm" -0.500  -2.200  -1.550  12.500  1.800  2.450
$hbox 5 "ValveBiped.Bip01_R_Hand" 0.060  -2.000  -2.500  4.060  1.000  1.500
$hbox 0 "ValveBiped.Bip01_L_Finger3" 0.000  -0.778  -0.625  1.826  0.400  0.439
$hbox 0 "ValveBiped.Bip01_L_Finger0" 0.000  -0.455  -1.279  2.198  1.123  0.471
$hbox 0 "ValveBiped.Bip01_L_Finger01" 0.000  -0.333  -0.647  1.275  0.712  0.361
$attachment "ValveBiped.muzzle" "muzzle" 0 0 0 rotate 0 20 0
$attachment "1" "muzzle" 0 0 0 rotate 1.92 89.98 -80.98
$surfaceprop "default"
$illumposition 17.271 -1.154 -16.696
$sequence idle01 "idle" loop ACT_VM_IDLE 1 fps 30.00 node Ready
$sequence fire01 "fire1" ACT_VM_PRIMARYATTACK 1 fps 30.00 node Fire {
  { event AE_MUZZLEFLASH 0 "SMG1 MUZZLE" }
}

$sequence fire02 "fire2" ACT_VM_RECOIL1 1 fps 30.00 node Fire {
  { event AE_MUZZLEFLASH 0 "SMG1 MUZZLE" }
}

$sequence fire03 "fire3" ACT_VM_RECOIL2 1 fps 30.00 node Fire {
  { event AE_MUZZLEFLASH 0 "SMG1 MUZZLE" }
}

$sequence fire04 "fire4" ACT_VM_RECOIL3 1 fps 30.00 node Fire {
  { event AE_MUZZLEFLASH 0 "SMG1 MUZZLE" }

}

$sequence altfire "altfire" ACT_VM_SECONDARYATTACK 1 fps 30.00 node Fire
$sequence draw "draw" ACT_VM_DRAW 1 fps 30.00 node Ready

$sequence reload "reload" ACT_VM_RELOAD 1 fps 30.00 node Ready {
  { event 6001 9 "2" }

}

$sequence dryfire "dryfire" ACT_VM_DRYFIRE 1 fps 30.00 node Fire
$sequence idletolow "lower" ACT_VM_LOWERED_TO_IDLE 1 fps 30.00 transition Ready Low
$sequence lowtoidle "draw" ACT_VM_IDLE_TO_LOWERED 1 fps 30.00 transition Low Ready
$sequence lowidle "loweridle" loop ACT_VM_IDLE_LOWERED 1 fps 30.00 node Low

Bumping cause I still have this issue.

Make sure they have the same origin. Make sure all rotation/scaling/movement for the skeleton is applied. Make sure all rotation/scaling/movement for ever bone in the skeleton is applied. Make sure all rotation/scaling/movement for both meshes is applied. Make sure the gun is parented to the skeleton.

That’s all I can think of right now.

Greetings again,
Apologies for the bump but I have some new issues that I didn’t think warranted a new thread.
I decided to move the model onto the old skeleton I was using (as I had no problems with it), however I now have more issues. The magazine for some reason moves on a different axis than the hands and gun, so moving it doesn’t really work…
Also, whenever I press the next keyframe button, the weapon flips out on itself for no reason.
I have applid all rotations, scales and locations, but still have no clue of how to fix this. Also when I close blender and reload the file, the model goes to the flipped out state rather than what I saved it as:

This model just does not want to work for me.

bump…