Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

FPS Arms

Discussion in 'General Discussion' started by Manyakasia, Aug 18, 2023.

  1. Manyakasia

    Manyakasia

    Joined:
    Apr 14, 2022
    Posts:
    3
    Hello everyone,

    I'm currently in the process of developing an FPS game and have reached a pivotal stage where I need to incorporate firearms. I have searched for tutorials in the internet, in most of them people are using IK but there is an issue, they are making a third person game. I already have full-body character with working locomotion animations. So I would like to ask a few stupid questions because I'm fairly new to FPS animation, so your insights would be greatly appreciated.

    1. Do you animate gun with arms or make separated animations (one for gun and another for arms) ?
    2. Do you use IK for animation? If yes than how do you add reload animation ?
    3. How do you adjust weapon position when aiming ? It should be hard to make aiming animation with sight directly in the middle of the screen.

    Sorry for my terrible English.
    Thanks in advance for your reply.
     
  2. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,317
    It is easier to animate arms along with the gun. You can either include bone attachment for gun parts in the rig, or even use separate models for every arm + gun combination.

    In the first person game you don't really need to.

    In the first person game you do not need to shoot from the gun. Basically you shoot from the camera, and gun is made to look like it is shooting. In at least some of the games the gun does not even exist in the world and is painted with a different camera.

    It is easy to make an aiming animation with sight directly in the screen. Basically while animating you'll know where the camera is, and you can place sight along the view line.

    OR you could do it with IK. Then you'd be able to fine-tune gun position at runtime.

    ----

    Basically you might want to consider whether you character has the body and it can interact with the world, or if it is just two floating arms attached to the camera. if there's a body interacting with the world, you could solve some situation with IK. However, if it is floating arms, the story is quite different.
     
    Manyakasia likes this.
  3. Manyakasia

    Manyakasia

    Joined:
    Apr 14, 2022
    Posts:
    3
    Thank you for your reply ;)
     
  4. Manyakasia

    Manyakasia

    Joined:
    Apr 14, 2022
    Posts:
    3
    In my situation I have full body character who is interacting with game world, even bullets will come out from gun barrel because I am referencing on DayZ. Following question, is IK method more flexible and easier rather than individual animations for each tool?
     
  5. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,317
    if you have character with physical body AND bullets come out of the gun, you'll need to use inverse kinematics in some places. Otherwise you won't be able to even aim down. overall, however, it'll be very similar to working with a 3rd person character.

    Individual tool use animations in this case will be probably added to a secondary layer which controls torso.

    Regarding your question. If you want a character to hit something with a hammer, that's a job for an animation. And if you want to adjust weapon position a little, that's job for IK.
     
    Manyakasia likes this.