Search Unity

Question Changing base bone rotations via code

Discussion in 'Animation' started by Ne0mega, Mar 27, 2021.

  1. Ne0mega

    Ne0mega

    Joined:
    Feb 18, 2018
    Posts:
    755
    I am looking to change a few key rotations, (like the spine bone to hunch over old people).

    I'd rather it not calculate/add on at the end of every animation frame, because I am expecting a lot of characters, and was hoping to put this, and many other "pre-rotations" on all visible characters on the map, which could be thousands late game.

    However, if having about 10 of these adding extra calculation to thousands of bones per frame would still be negligible for performance, I suppose I could do it per animation frame in late update.

    So basically: I want to add a few base rotations to bones, via code. Kind of added before the scene starts, but severity determined by parameters in code (the older they are, the more hunched they will be)