Boognish
Hi guys, new modder here, trying to learn the ropes!

Im trying to switch out the pistol in this game with another pistol model that was used in another UE4 game. However, the model seems to always end up being perpendicular or sideways inside my hand, not where I want it to be. When i import the new mesh into the editor it seems to be laying on its side, not like the normal Recall guns. How do you set it so that the mesh lines up with your hands like normal?

Thanks guys
Quote 0 0
olcasers
Hey.

So when I make mods, I just try to line it up with the original gun mesh.  It's probably not the best way to do it... I think it has to do with where the pivot point is on your mesh... but I rotate and scale the mesh based on where the gun is and trial & error for a while.
Quote 0 0
kuso1
olcasers wrote:

... I think it has to do with where the pivot point is on your mesh...


You're right.  In that tutorial by Epic's Zak, he says that it's based on the pivot/origin. I don't recall him saying whether it was based on the pivot/origin of the mesh or the armature/skeleton though. 

Tip: It seems that Epic makes it so the origins/pivots of the gun mesh AND armature/skeleton are in the exact same position (at 0,0,0).

@Boognish
I'm guessing all you need to do is change the gun mesh AND armature/skeleton's orientation either 1) before export from modeling program or 2) on import into UE4.

I prefer to change the rotation in modeling software, so the fbx is just ready to go.

<Here's an example of proper orientation in Blender>
First screenshot shows the orientation of the official Epic pistol mesh and armature/skeleton in Blender:
before_export.png

(In Blender, the gun barrel points down +X and its right side faces -Y.  The mesh and armature pivot/origin locations are identical, at world x:0,y:0,z:0

I orientated my custom gun exactly the same way as Epic's, and kept the default export orientation settings in blender. It imported with perfect orientation in UE4 RR modkit.   But, I had to make minor adjustments to the pivot/origin's location because the thickness of my gun's handle, and the distance the trigger is from the handle is different from Epic's. Ideally a different hand pose, or a new one would save me from having to modify the gun mesh. I don't know how to do that yet though, hehe.


If you're not using a modeling software to re-export the mesh, you should be able to fix the orientation on import by adjusting the rotation setting, highlighted here in red.  Just try setting each axis to something one at a time.  X = 90 or -90 or 180, or Y = 90, etc: 

(Just know that fixing the rotation/orientation like this on import won't necessarily fix any positioning problems caused by the pivot/origin.  In other words, it'll be oriented nicelike in the hand, but there'll likely be probs with the hand and fingers clipping into the gun.)
import.png

Quote 0 0
kuso1
This is a follow-up to my previous reply.

I have verified that the basic, main gun mesh's origin/pivot point determines its placing in the player's hand. That's it.  The skeleton pivot does not affect it.

I haven't verified whether the skeleton's pivot point needs to be in the exact same position as the mesh's. 

But, from what I've tested, the position of individual skeleton bones determine the position of static mesh gun attachments. 

i.e. for a revolver, the ammo_drum bone determines the orientation and position of the ammo drum static mesh.  The revolver blueprint uses that ammo_drum bone position to orient and position the static mesh for the drum.
Quote 0 0