I have a skeletal mesh for my weapon as the root component for it, but since you can't rotate a root components orientation in blueprint (which seems extremely counterintuitive if it is a mesh), my weapons are facing 90 degrees off so when they are picked up they aren't pointed straight. How can I change the rotation of the skeletal mesh so that way when its the root component it is facing the correct way? It needs to rotate 90 degrees on the Z.
#How can I rotate a skeletal mesh so it has different default rotation in blueprint?
18 messages · Page 1 of 1 (latest)
Either add a separate root scene component and parent your mesh to that or edit the mesh in blender. Stephen shows how to do that in his C++ RPG course for getting a common origin and orientation for your weapon. He also has a beginner blender course. I’m not an expert in blender do I would opt for the separate scene root.
I did the seperate scene component but when the weapon gets dropped the root stays in the air while the weapon falls. This means that when I pick it up next time its not at all aligned with the hand. These assets can't be easily imported into blender, its a process to do so so I'd like that to be the last resort.
Why can't they be easily be imported?
The assets I'm using require you to convert them to an FBX then import it which I can do but then I have to do that for every single asset that I have and there are a lot. I can rotate the socket that its attaching too but some of my weapons need rotation, some don't. Also some weapons need offsets as to where they sit on the player. Bottom line is if you could edit the root to change its rotation and position it would be much easier.
Lol well every asset, mesh wise requires you to export as a .fbx though I can see why in your case it would be a huge pain
These assets are purchased ones I bought while using unity, but they have unreal versions and they are not fbx's
Plus with these assets when you edit them in blender you have to jump through hoops to get them to import properly. At least thats how it is in Unity and I assume its the same with Unreal
Lol well no, that's actually not true at all with Unreal and Blender. In fact there's a pluggin that you send stuff from Blender straight into Unreal, in real time
What is that plugin? I'll give it a try
And I'm not talking about importing assets in general, its specifically these assets
Ok I have a few other ideas but I'm not sure if or how they can be done. These have to do with having a root component other than the weapon
-
How can I make sure the child object always keeps the rotation and location of the parent? When I detach my gun from my hand when dropping it, even if I use a component I can apply physics and gravity too, the rotation of the child gun gets messed up from the parent so the next time its picked up its all wonky.
-
Is there a way to offset where a collider starts at without setting its location? Is there away to change its center to be different from its location?
Just rotating won't work for all of my weapons I need to apply an offset to some of their locations
Weird. I use a separate scene root for my weapons (to support either skeletal or static mesh) and drop and pick them up with no problems. Not sure what I’m doing differently…
I would love to know what you did, I'm using different weapons now than I wanted to use
May I see your blueprint and constructor?
I’ll take a closer look tomorrow when Im near my computer. Just going by memory.