Search Unity

  1. Unity 2019.1 is now released.
    Dismiss Notice

True FPS Demo

Discussion in 'Animation' started by GenaSG, Jan 21, 2018.

  1. GenaSG

    GenaSG

    Joined:
    Apr 19, 2014
    Posts:
    100
    Hello everyone,
    I've decided to share my true fps demo with you. It's a simplified functionality from my side project.
    Demo can be downloaded from https://github.com/GenaSG/TrueFPSDemo .

    Enjoy
     

    Attached Files:

    Last edited: Feb 2, 2018
    CassioKF and Mauri like this.
  2. CTPEJIOK22

    CTPEJIOK22

    Joined:
    Sep 4, 2013
    Posts:
    80
    thanks, man, your project is good as start point
     
    GenaSG likes this.
  3. naimabbassi

    naimabbassi

    Joined:
    Feb 21, 2017
    Posts:
    4
    hi , when i put my model i get some error , the head is rotated and not work for it i don't know way, can you make
    a tutorial for it.
    thanks
     
  4. GenaSG

    GenaSG

    Joined:
    Apr 19, 2014
    Posts:
    100
    Hello,
    Usually that means that animation doesn't work properly. Probably non humanoid rig.
     
  5. Harrier

    Harrier

    Joined:
    May 11, 2015
    Posts:
    7
    Do you use own IK because LateUpdate is moving bones and IK target is in wrong position?
    I decided to try AnimationUtility.SetEditorCurve and make own animation using editor script, but i realized that SetEditorCurve uses muscle FK instead "transform" FK?
    I have no idea how to simply do something like this with muscles:

    Code (CSharp):
    1. this.animator.GetBoneTransform(HumanBodyBones.Spine).localRotation *= Quaternion.Slerp(Quaternion.identity, this.character.CameraRotation, .2f);
    Because changing "Spine Front-Back" raise legs...
     
    Last edited: Jun 5, 2018
  6. Harrier

    Harrier

    Joined:
    May 11, 2015
    Posts:
    7
    Edit: I gave up animation, currently i'm using animator.SetBoneLocalRotation in OnAnimatorIK.
    I just had to copy spine-chest-neck-head-camera-aimpoint structure using transforms and predict IK target position in Update.
     
    Last edited: Jun 7, 2018
  7. GenaSG

    GenaSG

    Joined:
    Apr 19, 2014
    Posts:
    100
    Hello
    Yes there’s a custom IK. It’s already in the demo project.
     
  8. KOCGI

    KOCGI

    Joined:
    Aug 15, 2018
    Posts:
    1
    Looks awesome. I just was wondering, if someone could give me tip how to set the animations up. When I start it, I only can walk and run. When I jump it still plays walking animations. I've seen there are some nice animations in the folders, but how do I make use of them? Would be great if someone could help me out with this.
     
  9. GenaSG

    GenaSG

    Joined:
    Apr 19, 2014
    Posts:
    100
    It's all standard thing. Create additional states in the Animator controller and pass variables to animator when needed.
     
  10. Major_Petrov

    Major_Petrov

    Joined:
    Oct 13, 2018
    Posts:
    2
    You're my hero, comrade