Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

[Solved] DampedTransform: allow movement to be damped

Discussion in 'Animation Rigging' started by joshcamas, Jul 24, 2019.

  1. joshcamas

    joshcamas

    Joined:
    Jun 16, 2017
    Posts:
    1,279
    Hello!

    The DampedTransform feature is super awesome, I'm using it to make a super cool flying dragon :)) However, I noticed it seems to only dampen rotation based on animation, not movement.

    In other words, if the rig's animation is not moving, but the entire rig is being rotated/moved, then the dampening essentially does nothing.

    Would it be possible to get a toggle that enables movement to affect this component?

    I suppose a better way to rephrase this is to allow making the dampening be affected by world space
     
  2. simonbz

    simonbz

    Unity Technologies

    Joined:
    Sep 28, 2015
    Posts:
    295
    Hey @joshcamas,

    The DampedTransform constraint should also be affected by world space.

    Damped Transform.gif

    However, if the root game object you are using to move your hierarchy is not referenced in any constraint and is not animated by any clip, its new transform position and rotation will not be taken into account when evaluating the constraint.

    To fix this, you can add a RigTransform component on the game objects where you expect the transform to be updated before evaluating the constraint.

    We modified RigTransform in Animation Rigging v0.2.4 to better cover these use cases as well. You can try it out in Unity 2019.2.

    Also, you can have a look at the package documentation for more information on RigTransform: https://docs.unity3d.com/Packages/com.unity.animation.rigging@0.2/manual/index.html

    Sorry for the delay on answering your question!
     
    fourthrones20 and joshcamas like this.
  3. joshcamas

    joshcamas

    Joined:
    Jun 16, 2017
    Posts:
    1,279
    Hm...
    In my case, the transform that's being moved around in a parent way up in the hierarchy, above the RigBuilder / etc. When I attach a RigTransform to that, it seems to make it bug out.
     
  4. simonbz

    simonbz

    Unity Technologies

    Joined:
    Sep 28, 2015
    Posts:
    295
    You shouldn't need to set a RigTransform on a Transform that is parent to the RigBuilder. This should get picked up in the constraint calculation.

    I just tried a similar setup with the DampedTransform example and it seems to work fine...

    There may be something in your scene that prevents the Transform hierarchy to be updated. If you want, send us a bug report and we'll take a look :)
     
    joshcamas likes this.
  5. joshcamas

    joshcamas

    Joined:
    Jun 16, 2017
    Posts:
    1,279
    I finally updated to 2019.2, which let me update the package - world movement works now! Thank you!
     
    simonbz likes this.