Change Root Location of Skeletal Mesh & Aligning Weapons

Hi all,

As the title suggests I want to change the root location of the AK to the handle so it matches the AR4, then align the Ar4 to fiit in the model, how can I do this?

Will I have to do the same thing for every additional weapon?

Should I look into implementing IK for the off-hand now?

Thanks in advance for the help!

Does no one know the answer to this?

or do you know? I haven’t gotten any help with this.

Thank you.

Hey there @anonymous_user_3cf2ac1c! It’s rare that I’m summoned directly! So if I remember correctly you’re just welding them directly to the player’s hand socket right? So basically there’s always a number of options you have for this. I’ll start with the best option which may not be viable depending on how far you are into production.

  1. Best: Every gun is set up the same, ie same rotations, locations, and rooted directly on their primary handle and you use snap to target. This means that every single time your start preparing a new gun, all you have to do is handle your other hand’s positioning. This isn’t easy if all your assets are external.
    image

  2. You could manually set a local offset when you equip the gun, once it’s fine you could put this in with your gun’s stats and when it’s equipped you can always apply that offset. That’s going to be a tedious process but you don’t have to work with the source objects much.

image

Hi and thanks for the help.

Let me clarify my post since I am also still understanding Static/Skeletal meshed.

The left hand isn’t the issue it is how the weapon is spawned in the socket attached to the character mesh. (Sorry for asking about multiple topics, IK and animation is a whole other beast for me to tackle, my fault).

Not working mesh


Working:


The bone transforms are the same so what am I missing?


I was originally using a different skeelton for the M416 that came with the same asset package as the Ak47 and it was working fine. Does this new m416 skeleton need to be reimported on a new transform location?

I notice that the root locations on the meshes are different. Im sure this is related to the problem. How can I sync/ change this location if I can?

Thanks again!

You’ve basically already understood it! It’s got a wrong origin point rotation. So basically if you take a look at those rotations on the bones you can see one is forward in X and one is forward in Z. However this is determined 2 times. When the object is first created/exported and when it’s imported to unreal. So there are some options!

I work with game logic most of the time, and less with the technical art side so take all this with a grain of salt.

Option 1: If you still have the option, you can reimport the gun and make sure to set it so that it’s forward is on the X axis. This will fix your directional issue, but you’ll still have to offset to get the correct handle location.

Option 2: Export it out, edit it in your 3D program of choice to be the correct orientation, freeze transforms, then reimporting it as normal. Making sure the pivot point/root is where the handle is. That’s where the snap will place the center.

I’m not sure what you mean about the “being forward in X and Z” since the rotation angles are the same but it sounds like I can reimport the static mesh to change the root location on the skeletal mesh?

This in a marketplace asset, do you know how to reimport from that folder without having to export, delete, then reimport every gun with an off root?

So the rotation angles themselves are the same, it’s just that the gun itself (this it’s root and bones and everything also) are imported with the belief that Z is the axis that’s forward, wherein your other has X as it’s forward.

Before I go get tons of documentation I noticed you marked the solution, did you get it sorted?

Yes i did, importing the static mesh worked like you suggested for solution 1.

Five stars as always ! And I promise not to “summon” (hahaha)/bother you unless I’ve gone 14 days without help from anyone else!

Thank you!

Oh no worries! I’m here to help! I just prioritize posts with 0 responses most of the time as for most questions someone from the community beats me there without having much for me to add!

If the mesh origin isn’t properly set (reasons), then the best approach is to use a scene component as an anchor.

Each weapon will have to have its own class. They can be child classes.
e.g. Weapon (parent) → Wep_M416, Wep_AK47 etc.

This approach uses the scene component as the attach point. The mesh position is relative. So you simply adjust the position of the mesh in the class viewport.

Actor class:
Scene Component (Root)
→ Mesh (Skeletal, or Static)

2 Likes

Extremely helpful! I had an issue with the placement of my sword.