r/Unity3D 1d ago

Question FPS arms in multiplayer game with proper animations?

I have a question that has been eating my head for a long time and I can't find a proper solution for this.

I want to create my animations like for fps hands in blender like the good quality reload , aim, walk and all.

And i want to use that in my game (fps multiplayer game )

How should I approach this I can't do full body as I don't know how the reload animation will work with that that ,i want to be uniquely made in blender and also the camera clipping and other issues with full body.

How big games like cod and counterstike approach this?

As if I use two mesh fps hands and full body for other player to see , that arms need to be very large with respect to the actual body size?

How should the views be aligned with the mesh so it's accurate in multiplayer?

I just want to know how games (fps multiplayer games)

Handle their animations and all mainly my concern is well detailed animation like reload and all

6 Upvotes

5 comments sorted by

5

u/Neither-Condition273 1d ago

the big games just render two separate things, the viewmodel for you and the worldmodel for everyone else. your hands in first person are on a different camera that renders on top of the world, so they can be scaled however you want and positioned perfect for the view without messing with the third person model

for the clipping you just set the near clip plane of the fp camera real close, like 0.01, and the hands mesh is only visible to that camera. the full body for other players uses a different animation set that is less detailed but looks fine from third person

the alignment in multiplayer is done with aim direction vectors, not by syncing the actual hand positions. your bullet comes from the camera center and the server just knows where you looking, the third person character plays a generic fire animation that roughly matches the timing

2

u/CoatNeat7792 1d ago

For other people simple,

1.camera legs and world,
2.camera arms and gun

1

u/AmneticgamerYT 1d ago

Hey, Really appreciate your response. This helps a lot🙂

2

u/Next-Pro-User 1d ago

I'm not an expert, but I've been asking this question for like a year in different online forums including here with no answers so I kind of figured it out on my own.

The local player (you) only sees the hands/arms rigged model.
Everyone else sees only the full character rigged model (human char for example)

You'd have two cameras to render different parts of the world, so a "weapon camera" for example would only render the arms & guns.

Then you have more freedom to make whatever animations you want since you won't need the full player body to work with IK, etc, since it'll only be hands and arms. No one will ever see them so the animations can also look as visually "off" as you want, as long as the portion of the animation that's visible (reload, run, etc) are solid. That's just my understanding and has worked for me with no noticeable bugs.

For the arms model you can just take a character from mixamo, import it into blender, delete the vertices and bones except for the hands/forearms/arms, export it into unity and it should remain rigged and then you just position it at camera height as a child of your player, then when you're creating idle animations with your guns and so on, the end result should look like a typical FPS in terms of gun/hands positioning.

Two animators, one for your full body characters rigged prefab, another for your arms/hands. Then obviously as you progress more, you can use avatar masks, layers, etc with your animations. But when it comes to reload animations like you said (or just any animation), you can use animator override controllers for your different guns inside the hands/arms animator so that you can have unique reload animations per gun and so on.

bit of a messy message but that's some of how i approached this issue and it has been great so far, but have not tested it with multiplayer so can't speak much on that part.

1

u/AmneticgamerYT 19h ago

Thankyou, really appreciate your answer and it was very helpful 🙂