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

Major performance hits

Discussion in 'Animation Rigging' started by FakeBocha, Jun 4, 2020.

  1. FakeBocha

    FakeBocha

    Joined:
    Aug 8, 2017
    Posts:
    23
    Hello,

    I'm using this package for a 3rd person shooting game (I mostly use the the package for Aiming and hand placement).

    When I use just 1 rig it hit my FPS by 40!
    is there any way to optimize its performance?
     
  2. danUnity

    danUnity

    Joined:
    Apr 28, 2015
    Posts:
    229
    I would be surprised that the Animation package does cause major drop frames like that... It's actually really optimized compared to the old constraints. I would look at your code that does the aiming and hand placement to see if there could be a bottleneck there
     
  3. segant

    segant

    Joined:
    May 3, 2017
    Posts:
    196
    Which script you use? Is it chain or others? Chain solver using fabrik script and if bones counts are too high, calculations will be longer.
     
  4. FakeBocha

    FakeBocha

    Joined:
    Aug 8, 2017
    Posts:
    23
    I use animation clips in another layer to set the weights on the constraints.
    I checked the performance when i disable the script and change the animator parameters manually and it almost didn't impact performance... so the problem is the constraints.

    No chains or stuff like that.
    Mainly 'Multi-Parent' constaring and some 'Aim' ones.
     
  5. segant

    segant

    Joined:
    May 3, 2017
    Posts:
    196
    Deep profile and find which function cause this.