Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

How to make character arms/head aim up/down following crosshair?

Discussion in 'Editor & General Support' started by arvzg, Jan 30, 2011.

  1. arvzg

    arvzg

    Joined:
    Jun 28, 2009
    Posts:
    619
    Hey all,

    In any third person shooters (as well as FPS) when a character looks up, or looks down, the character models obviously 'animate' along with the direction the player is looking. How would you implement this? The way I thought about it was to have the arms and the head rotate when the player aims up/down but I'm not sure if that would work or if there's a better way? :confused:

    Would a better way be to get a fully rigged model and kind of animate the bones in unity?
     
  2. Caps

    Caps

    Joined:
    Jul 23, 2010
    Posts:
    21
    Hi Arvz,


    This is something I´m about to start working on, and I also wonder what would be the best solution.

    I´m not sure just rotating the arms and head would work because you might have to do some additional rotation on other joints like the forearm and hands, the reason for that is because since both hands hold the gun/rifle it´ll be very difficult to maintain the grip of both hands on the same position on the gun/rifle while the arms rotate, so, the forearms and hand joints might need to be rotated also for that. In animation, IK applied to the arms hierarchy would help solve this but I don´t know what would be best for real-time as in Unity.

    I´m not sure if Locomotion can provide a solution for this, maybe someone can answer about it. But anyways, I kind of get bothered by Locomotion´s making characters sometimes look goofy for the steps, so I´m a little resistant about using it. Might also just be an impression I got while watching their demo videos.

    Another solution that might work (but I´m really not sure about this) would be to have your character animated aiming up, down in your 3D package (Maya/Max/Whatever) and have that animation imported then trying to play that animation by frame up or down if character aims up or down.

    So again, these are just some thoughts and I haven´t really tried any of them, perhaps someone already experienced on this might give us some enlightenment. :-|
     
  3. arvzg

    arvzg

    Joined:
    Jun 28, 2009
    Posts:
    619
    Yes actually I thought about doing it as an animation as well but I didn't know how or when the animation would be played and how is it played etc. I'm not sure having it go frame up/down will work - I imagine it will be very difficult to match the native speed of the animation to the speed that the player is moving the mouse cursor. I know you can speed up/down the animation using AnimationState however in my mind it sounds like a whooole lot of trial and error work

    I'm not sure about locomotion as I haven't played around with it yet

    Hasn't anyone else come across this problem?? It feels like it would be quite a common feature in many third person games
     
    Last edited: Feb 1, 2011
  4. Caps

    Caps

    Joined:
    Jul 23, 2010
    Posts:
    21
  5. helioraanswer

    helioraanswer

    Joined:
    Apr 7, 2009
    Posts:
    412
    Hi,

    Can you repost or just post it here because the link is dead.

    thanks,
     
  6. phakscion

    phakscion

    Joined:
    Jul 19, 2011
    Posts:
    4