Camera not facing direction indicated by viewport

No matter which direction the camera or cameraboom is facing in the pawn blueprint, the camera will always face the left direction from the parent skeletal mesh. I’ve tried rotating the camera itself and the camera boom but it seems like it doesn’t matter what i do it always wants to face this direction, and if I use controller rotation yaw, the mesh will rotate so that it’s left side is facing the same direction as the camera :confused:

I believe this left direction is ‘forward’ and the mesh is what’s facing sideways but with the mesh as the root node i have no idea how that could be fixed since the mesh canrnot be rotated as the root node.

Probably Related: Inconsistencies in how "forward" is handled! - #5 by OptimisticMonkey

Hey @Cestarian!
Two things:
I notice your camera local rotation is 90 on z. Try resetting that.

Failing that, what likely happened is your character is rotated, which happens MOST of the time with imported meshes. You usually have a scene node as parent, then skeletal mesh, and rotate that 90 degrees to make it face forward.

To fix this, add a scene node to your character, and make that your root. Now you can rotate your static mesh. Do that, then make the skeleton the root again.

That SHOULD do it! :slight_smile:

it didn’t work, i made a scene node as the root, rotated the mesh, and that fixed up the camera issues, but making the mesh the root again reset it’s rotation and undid the fix.

Is it necessary that the skeletal mesh is the root? You’ll have to export it to a modeling software to change it if so. Usually characters don’t use the skeletal mesh as root, though, so it’s pretty normal to leave a scene node as the root since not everything should be parented to the mesh.

Well, it’s probably not necessary no, but i’m planning to use the more advanced colliders for the skeletal mesh (per-poly colliders are my current intention but i might optimize it somehow later) and I don’t want the capsule collider in the normal character blueprint to be interfering with it, besides it’s kinda pointless to have a capsule collider on top of the meshes own colliders anyhow.

I couldn’t figure out a way to disable collision for the capsule collider while keeping it for the skeletal mesh (it’d just fall through the floor seemingly no matter what i did) which is how it occurred to me to make it the root in a pawn blueprint instead of a child of the capsule in the character one which lead me to this issue.

I haven’t tried very hard to figure out the perfect way to do this but information online seems kinda scarce on it.

Only alternative i’ve really tried is using a scene root node, but physics and collisions on the child skeletal mesh are always in some way beholden to the root node and I don’t have a clue what the right combination of nodes and settings would work for me :confused:

Which is why making the skeletal mesh the root node seemed like the simplest solution.

Guess i’ll make a separate thread to ask about that specific issue :thinking: it looks like this one really is an editor limitation.

Ah, I follow your logic.

You should be able to set the capsule collider to only block world static and your skeletal to ignore it, that should keep you from falling through the floor, and unable to pass through walls as long as your skeletal mesh is locked to your collision capsule. Then use the Skeletal for any other collision! This is how games like Dark Souls or Elden ring cause a spear to miss you if it doesn’t touch your visible character (minus capes, they have no damage collision) but running against walls doesn’t make your character wig out from all of the collision from your fancy armor…

Well yeah that solves my problem, thanks! I hesitate to mark it as a solution though because it doesn’t actually solve the original question :sweat_smile:

You’re right! But it DOES put us a step in the right direction!

Because now you should be able to do what was stated in the first step:
Make the capsule collider or the scene node be the root, and Rotate the skeletal mesh 90 degrees to match the forward of the actor. :slight_smile:

Yeah, like I said before, this is really common for skeletal meshes. I don’t know why it is this way, but it has to do with modeling software exports being 90 degrees off from Unreal’s forward.

Give that a try and see what happens now! :smiley:

Yeah that works, i’m gonna accept that solution because there isn’t really a better one.

But I think it’s incorrect that models are exported facing the wrong way for ue (after all when you view them in the skeletal mesh editor or control rig they aren’t facing the wrong way) it’s like that thread I linked to in the OP said, this is just an eccentricity of UE, where for some reason skeletal meshes need to face the wrong way because control rigs expect them to

1 Like

Ok, I have figured out an actual solution now. It’s simple, somewhere preferably near the start of your animbp or your controlrig you just put something like this:

(controlrig)

Now your character will be rotated towards the X axis instead of the Y axis.it’s a bit odd that there is no quaternion math operation so i had to convert it to a vector and then back to a quaternion in order for this to work.

You do need to be careful about how exactly you do this, because i noticed that for instance if the euler rotation order is set to ZYX (the default) the character actually rotates on a different axis as well, I believe that you must ensure that the Z axis is set first for this to work right no matter which method (modify or set transform) you use.

1 Like