New view model is invisible

So I turned the glock model I made into a view model by rigging it to the pistol hand. I compiled it correctly with all of the animations and everything. It shows up in model viewer flawlessly, but when I try to replace it in Garry’s Mod, it is invisible when I switch to the pistol. It is just invisible. Even when I spawn it from the spawn menu it is…

Anyone have a fix for it?

Did you decompile the pistol model to modify it? If so, it’s probably pointing in the wrong direction or sitting too far above your head. Its angles can be adjust in your .qc via the $origin function.

I did that. I used $origin 0 0 68 if that is correct…

Well damn. I tried like 6 times with the $origin function and it stayed in the same place. I did the ironsights viewer and copied the position and pasted in the .qc file but when I compiled, nothing even happened to the position…

when compiling a decompiled model you should use $origin 0 0 0 -90. no the 3rd 0 isnt a typo. this spins it 90 degrees counter clockwise when compiled, as the decompiler (assuming you’re using Cannonfodder’s) spins the animations 90 degrees clockwise for some reason.

Use the .smd from the sourcesdk_content V_pistol file and put the glock on that then compile it using the .qc thats in the same folder.

YES I FIXED IT! All I needed to do was change the 0 0 0 -90 to 0 0 0 90. It works now. Thanks mastachief.