Multiplayer FPS characters

Based on the shootergame example, it appears that for a multiplayer FPS you need a full body character and a ‘arms only’ character. One for the FP view, one so other players see more that a set of floating arms. Is this necessary or just the way it was done? Is it not possible to use a full body and set the camera so the FP view is still good? Seems somewhat repetitive (and resource intensive) to have two characters per player along with two sets of various animations.


You can also just do it with a 3rd person mesh, but then you have to create animations which can be seen by the players camera (I think day z is using this method) :slight_smile:

I thought perhaps it would be better to use a full character and just place the camera slightly in front of the face, but was not sure if in looking around that would cause trouble or not.

As far as I know it shouldnt cause any problems, but you might have to adjust some stuff (animations, rotation of the character, position of the camera,…) :slight_smile:

Yeah, I pulled up the third person game sample and moved the camera, and fiddled a bit… seems there will always be a case where the body mesh is ‘in the way’ … will have to play a bit more.

I guess if I could peg the camera so it was attached to the head so where the head went with animation the camera would never fall behind it.

But now I am figuring I just need to do what it seems even shooter game does… full body that other players see and arms that the player sees of themselves. Have been fiddling with it a bit, but can’t figure out how they did it. But shooter game uses C++ to and I haven’t gone down that road yet…

This is more commonly referred to as “True first person” and I think it’s a far better way of doing it than having floating arms, especially with VR.
Might be harder to get right, especially make animations look good in both views, but we haven’t had any problems.

There are multiple ways of fixing the problem with seeing the mesh clip through camera.
You could detach the head and make it only visible for other players. Or you could have a separate material for you on your character that fades it out within a certain distance.
There are probably other ways of doing it but I’ve tried both of those and gotten good results.

Hmm… will have to revisit those ideas and see if I can figure it out. I was trying to figure out where to set onlyownersee and ownernosee as I read that is how they do the full body and arms things, but I could not find it. Of course it seems it would be better to use your methods as that only one thing to animate.

In Crysis they show the full body more or less but they still have first person animations that are forced on the arms that aren’t the same as the third person animations. This way they ensure things look good from both angles.

I myself tried to do this and have it look good but it’s hard. If you do full body view from first person wrong, mouse looking will feel wrong. Games like quake, for example, feel great as you look around but you just see floating arms. Just slapping a camera onto a third person mesh head feels really awkward, so you have to go to extra lengths to make things look good.

I actually gave up on the whole full body experience because I cared more about having a solid fun well controlled first person shooter. I REALLY wanted to do it too, believe me. I may revisit it again though. It’s a great way to have your own shadow be in the world.

One thing I tried is faking it by having first person legs and arms but no body. And I’d make the third person mesh cast shadows but still be not visible to viewer. So when you look down you still see the legs, and it’d play the same animation and you see your legs walking. I think this is what they did in Halo 2. However, it was very hard to find a good camera position such that when you look down you see your waist and can’t see where the legs end. The camera needed to be placed much lower than eye level, and it looked good but my eyes were now around my chest, making it look very weird when I walk up to another fellow character. Mouse looking in Halo 2 on PC never felt right either since I could tell the camera pivot was somewhere behind your eye location.

I ended up having to pull some tricks I read others did and scaled the legs vertically by like 2x to do a perspective trick. When you look down things still look pretty normal even though the legs are stretched such that the waist is actually about where your neck would be. And I was then able to still place the camera near the eye level.

In the end, I scrapped this because it still looked kinda bad and I had to limit the look angles so you can’t look all the way down like you can in most other fps games.

Also I read some polls, and people generally said they don’t even like seeing your legs when you look down all that much. The walking animations usually look weird anyway. It looks OK when it’s in third person, but somehow it always tends to look wrong in first person since the legs don’t move quite right. It just takes a ton of effort to do right or don’t do it at all and go with the classic feel which is known to feel great and solid.

One nice thing I learned from this though is all the cool perspective tricks you can do with first person geometry. In UE4, there aren’t separate depth groups for first person view arms anymore, so you can see your gun and hands clipping into walls in all of the samples nowadays. I simply scale my character’s first person arms down to like .25 scale or so. All that matters is the arms generally fit within the collision capsule. In First person view, they still look right, and they don’t clip into the walls. I haven’t had any horrible issues with this yet. It’s not guaranteed to work 100% though because if my character suddenly takes out a huge long sniper rifle, it’ll probably still penetrate a little since I scaled down for the average case. If I change scale depending on weapon, it’ll noticeably change the arm size so you just have to keep it constant.

Hopefully Epic will address the “true first person” with their official VR template. I need to double check, however, I believe Mitch’s template has the true first person perspective.

edit: as far as animations go, I think the problem with most animations is that the animators / design of the game tends to be “bigger than life”… such as the Sword/shield animation. I would love to see someone try to fight like that in a Kendo match… insta win for me.

edit: this can be solved by using motion captured animations.

Even with mocap animations it’s still hard to do right when it comes to seeing your legs. The feet have to be positioned correctly with IK. This is doable and looks fine in third person perspective, but you start running into issues with first person. If my character is standing on a tiny rock that has no collision, and is only there for decoration, the foot is going to clip through it a little. It becomes a lot more noticeable in first person when you look down. And that’s just one example. There are many examples of decoration only geometry that may be on the ground that your foot might clip through.

So maybe you start adding physics geometry to these objects, and the collision only works with feet and not projectiles and other regular physics. But even then, you usually use approximate geometry and the foot might not align completely with the 3D mesh. So then you use per triangle collision instead for feet. Now you might start running into issues with the foot coming in at odd angles on some really complicated meshes. Or maybe it’ll start fighting and jumping from position to position, which can possibly be solved with a little dampening, but then you still have noticeable over penetration.

Another issue is the walking animation itself. The transition from standing to animating walking can sometimes be pretty harsh. It looks weird even from third person if you pay attention close enough. It looks especially weird in first person. One thing you might see if you’re quickly tapping the movement key is you move a little, but your legs are doing a weird smooth transition from between standing and walking. As you keep tapping, your legs never quite finish transitioning to the walking animation so you start looking like you’re hovering a bit instead of walking. And you do that a lot when trying to, for example, navigate a narrow log or something. If you look down and see your legs while doing this, you’ll see this annoying animation artifact. Maybe there’s a way to fix that, and I’d be interested in knowing how. I just know, if I go with the built in unreal animation system, or even play unreal tournament itself, I’ll see this effect. One solution I can think of is having a very short transition time between the animations.

Anyway, it’s doable, but not trivial.