Search Unity

Question Custom Rigging constraint

Discussion in 'Animation Rigging' started by keni4, Jul 5, 2020.

  1. keni4

    keni4

    Joined:
    Nov 30, 2014
    Posts:
    31
    Hi!
    I am trying to write custom constraint and I need to control Rig weight inside of TJob.ProcessAnimation method. How can I achieve this?
     
  2. simonbz

    simonbz

    Unity Technologies

    Joined:
    Sep 28, 2015
    Posts:
    295
    Hi,

    The rig is used as an assembly of many constraints, and therefore, the rig weight is not really meant to be written to by constraints themselves. You can use the `jobWeight` handle inside a constraint job to read the resulting weight of both the rig and constraint, but you shouldn't write to it.

    Instead, I would suggest writing a MonoBehaviour script that does some preprocessing work on your rig and set the rig weights there.
     
  3. keni4

    keni4

    Joined:
    Nov 30, 2014
    Posts:
    31