Rotating AWP object 90 degrees relative to world center in blender?

So, I made a thread a while ago about CS:S models in CS:GO. I’ve picked back up on it, and I have an AWP model where the AWP for some reason decompiled being rotated 90 degrees in some of the animations while the hands are stationary. How would I go about rotating the AWP 90 degrees back to it’s original position but relative to the world (grid) center rather than the AWP’s center in blender?

hopefully this picture explains it better

[editline]22nd February 2017[/editline]

alternatively, is there a program other than Crowbar (because crowbar fucks up my decompiles) that won’t rotate shit 90 degrees to the side for no reason? it did the same to other weapons but it was the hands instead (which pivot from the center so i didn’t have an issue re-rotating them)

I don’t know why it decompiles like this, it’s fucking annoying

shift+s -> 3d cursor to center
change that thing that looks like two overlapping circles near the bottom to 3d cursor
select awp and rotate

thanks, but is there an easier way to do this? seems like typing directly in the box changes the AWP rotation relative to itself rather than the center, the only way for me to change it relative to the center is to rotate it in view which isnt precise.

(i got extremely lucky to land it very close to -90 but it’s very inconsistent)

[editline]22nd February 2017[/editline]

nevermind, found it.

is there a way to make this faster so I don’t have to do this for every frame of animation?

[editline]22nd February 2017[/editline]

yeah, this is fucking ridiculous, now i’m trying to rotate it and it moves back a frame and rotates THAT instead

what the fuck

if you press r you can also enter enter values. look at the bottom for more info

Your pivot point is set to 3d Cursor, not Bounding Box Center. On the bottom toolbar next to Object Mode, Viewport Shading there is another menu for how the object pivots. Before you access the Timeline, move the object to the desired location and for good measure hop into Object Properties - Apply- Location/Rotation

ok, that’s cool and all but there has GOT to be a faster way to do this. also, after this, i’m going to mirror all the animations for about 60 weapons, (meaning scale -1 and inverting all X rotation values) including the AWP. also moving the object messes up the animation in-game, it seems like I have to change every frame of each of the broken animations for it to work properly.

Try to rotate the weapon, apply their rotation and export it. Then import the weapon, and the animation file, see if it fixes this way.

in this gif what (i think) im doing is rotating the object, but it’s not aligned (since the bones still stay in the same place, and i don’t think i can move the bones without moving them every frame)

Did you apply the rotation

Thats probably important

I’m thinking the same thing. Needs to apply rotation.

Have you tried rotating the weapon base bone in pose mode -90 degrees around the global Z Axis and then saving the rotation and location to the keyframe and then repeating for every key frame. I tried that and it worked.

i thought that does apply the rotation, what am i doing wrong?

also, cpone, i’d have to do that about 400-500 times, not really something i want to do

  1. Before hopping into frames position the rifle where you want it to be with the armature/bones (don’t move the object on its own).
  2. Get your hands positioned as well so that everything looks good from frame 1.
  3. Go into Object mode, click on the gun and then Modifier - Apply Armature Modifier
  4. Repeat step 3 with all other objects parented to the armature.
  5. Go into your armature in pose mode, highlight all bones.
  6. Go to Pose - Apply - Apply Pose as Rest Pose
  7. Highlight/Select all objects that belonged to the original armature and Parent them to the armature.

You may also want to check there aren’t any conflicting armature stacks also. Just clear them and start fresh in the weapon object.

send me the files and i will fix it for you

“applying transformations” is done by hitting control+a. most of the time you’re going to want to just apply rotation and scale. applying location just seems to set the object origin to the world center.

this is confusing. so, do I parent the skeleton? to what bone? what the hell

even then i don’t think i’m doing it right. this makes me want to shoot myself

Here are the files,
If you do fix it, (especially if it’s in a way that isn’t tedious) please let me know how, thanks

And applying the transformations to the object doesn’t seem to make a difference (the pose is in the same place, but if i change the resting pose, it fucks up)

You parent the entire object to the armature. All the objects.
The rifle should already have a bone it is weighted to by this point I’m assuming. So when you parent again it will be assigned to the given bone.

You position it, apply the armature in the properties modifier tab. You do this for the arms, the gun, everything.
Then you go back to the armature, go into pose mode, and set it as rest pose. Now it should all line up.
Select all objects, click the armature and Ctrl P.

This is what I do when I do my mods, I’ve encountered this more than once with objects going screwy after I weight paint them. I’m only assuming that is the case here.

here’s a video of me trying to do everything


i kind of got confused at the end after parenting everything trying to do exactly as you said click on the armature, but, wait, what the hell is the armature? i thought the armature was all the bones, but i guess not

just for the sake of closure, i ended up just doing it the slow way, took a while but i guess i was just being lazy about it, though i can’t imagine doing this for more than one weapon

works fine now, though, (just rotated 90 degrees and saved location and rotation into each keyframe)