c# | Fps System Like DayZ

Hello everyone, i come here cause i am stuck on my project game
i wanna make a survival game, like DayZ or H1Z1 but only in fps view
For that i needed to make a player model with animation etc
But i don’t know how to make weapon stay on model hand and move when i aim

So i hope you can help me

Sorry for my bad English i am French

Have a weaponHolder gameObject (and put it where you want the weapon to go) put that in your player gameObject, and the weapon in the weaponHolder

Thanks to the reply but what do think when you say weaponHolder ?

Right click on your Hierarchy create a new EmptyObject and put it where you want, called it weaponHolder Put it in your Player object

Thank you, but my problem is not to make the weapon a children of the player
I search to make the weapon and the player hand follow movement camera when i press rightclick for example
Someone tell me to search on the way of view model and world model, but i don’t understand really

So you want to move the hand independently from the player body?

Yes
For example, i take a weapon, weapon go in my hand, i right click and i can aim with weapon, if i watch up the hand and the weapon aim up etc
A fps system like DayZ or many of other game
And i don’t know how do to that

You will have to access the skeleton of the animated model and find the wrist bone to attach the weapon to.

Usually I see FPS characters have 2 versions depending on who’s viewing who. This matters more for online play when players see other players. When you are viewing from your character, your model is only your arms at least, with a torso and legs at most. When another player is viewing you, your model is a full body model. Same with situations where you are viewing your character through a mirror or other reflective surface.

I do not know what your scene setup is like or going to be like, which makes this question hard to answer. If your game is going to only be single player, you can get away with your player being arms parented to the camera, and the weapon parented to the wrist bone of those models.

Thanks Laperen to your answer

My project setup is probably going to be multiplayer

I have finnaly can make my body player attach to the FPSController, make the animation Walk/Run/Jump
And i see something on the net called Inverse Kinematic, so can i use that to make what i needed ?

Nobody know how i can make a aim system now i have attached the weapon to my hand bone character ?

There’s lots of tutorials you can check out to help you do this.

You can start by checking out the Merry Fragmas FPS tutorial

https://unity3d.com/learn/tutorials/topics/multiplayer-networking/merry-fragmas-30-multiplayer-fps-foundation

Thanks to your answer
I have watched the series, but that not really help me
In fact what i want it’s a system to aim like in modern fps and the rest of time the player juste keep weapon in this hand