How do you setup a First Person game but still use the third person mesh for shadowing?

Hello everyone,

I created a new 3rd person template, but I want it to be 1st person, but not like the 1st person template: I want to see the legs and the shadow of the body.
So I moved the camera in front of the head, it works great but the only problem is that sometimes the head get through the camera and it doesn’t look good at all.
So I thought the solution would be not to draw the head at all, but I still want to see it in the shadows…
I have no idea how to do it…

Thank you if you can help me!

1 Like

hello
you need to use 2 meshes one for First person view (hands and legs only) and other for the 3rd person view (one will be seen)
FirstPerson mesh inside blueprint → Component->Details Set Only Owner See (don’t forget to Disable collision)
3rdPerson mesh inside blueprint → Component->Details Set Owner No See (don’t forget to Enable collision)

i hop it help you. :slight_smile:
Best Regards

Here’s how I did it;

Create new project as First Person Template (Blueprints)

Make it so no one else can see your First Person mesh

Blueprints > MyCharacter > Components > Mesh1P > Rendering > Only Owner See (checked)

Add your 3rd Person mesh:

Blueprints > MyCharacter > Components > Add Component > Skeletal Mesh (I named mine “Mesh3P”, as there is already Mesh1P for the first person mesh)

Mesh3P > Mesh > Select “HeroTPP”

Mesh3P > Rendering > Owner No See (checked)

Remember to position the mesh nicely so that it has the correct rotation + position to align with the First Person Mesh.

Enable self-view of 3rd Person shadow, even though 3rd person mesh is hidden from self;

Mesh3P > Lighting > Cast Shadow (checked)

Mesh3P > Lighting > Cast Hidden Shadow (checked)

Animate the the 3rd Person Mesh

Mesh3P > Animation > Animation Mode > Use Animation Blueprint

Mesh3P > Animation > Anim Blueprint Generated Class > ASP_HeroTPP_AnimBlueprint

The “ASP_HeroTPP_AnimBlueprint” blueprint comes with the free Animation Starter Pack from the library. I did try it with the default TutorialTPPAnimBlueprint but ended up with a static shadow following me everywhere with his arms locked out to the sides.

4 Likes

Thanks for the Cast Hidden Shadow trick, kreza.
Work great.

The best way to do this is to actually use the Third Person Blueprint and then just drag the Camera and drop it on top of the Mesh (to parent the camera to the mesh) then delete the SpringArm.

Now with the camera selected, under Parent Socket hit the Magnifying glass and choose the Head bone from your character. Turn off Real Time in the viewport by clicking on the down arrow (so that the idle anim stops the camera from bobbing with the character’s head and then Reset the Location of the camera to 0,0,0 and then move it into place just a little bit ahead of the character’s face in X (I recommend 20 for the default UE4 character). Make sure the rotation is correct as well, it should be facing forward with the “Viewfinder” facing up like \

Now with the camera selected, make sure that Use Pawn Control Rotation is checked and then hit the Class Defaults button and type Yaw in the search and make sure Use Controller Rotation Yaw is also checked.

That’s it. You now have a working “First Person” view with a full body and shadows without the need to have two meshes. You can make all of your animations full body animations and it saves you from having to create any First Person anims as well. Absolute best kind of First Person. Just be careful with the camera placement; sometimes a single unit in X or Z will make a world of difference. If the camera is too close to the player’s face in X then when you look all the way up you’ll see the top of the character’s head and all the way down might clip into the chest.
Also I actually recommend that you scale the Capsule component up to 1.25 and the mesh down to 0.75 so that the camera is completely inside the Capsule Component to avoid the camera clipping through walls. Just make sure to test being able to walk through doorways cause increasing the Capsule Component will change your character’s collision bounds.

Nice way to do it yesh. Just a question you maby known on how to make the animation of shooting working like this? If you understand what i mean

Well, the difficulty with this setup is making sure that the camera’s POV is set to a value where you can actually see the arms when the animations play. I’ve since discovered that you sometimes need to have a very misproportioned character mesh in order to get everything to look right. Sometimes you need to make the arms a lot longer in order to get them to show up in front of the camera. This is why in the shooter demo there are separate arms. It’s a more simple work around for that issue. So I guess there’s no perfect solution.

Maybe this is a silly question, but if you use the built in FPS template its just a set of floating arms and no body, if you make it multiplayer isnt that all youll see from opponents? floating arms running around shooting each other?
,

Yes, you have to have a 3rd person body that is replicated so that it’s visible to other players online but hidden from yourself.

Try with 3 meshes 2 Third person and 1 with arms (1. Mesh Owner no see and the other to Owner only see)
Cast the shadow just from the 1 one. And Hide Bones from the second skeleton mesh like head arms what you need…

TY Kreza!