Quantcast
Channel: Unity Forum
Viewing all articles
Browse latest Browse all 1466670

Using AnimationClip.SetCurve on child object.

$
0
0
If i have 2 cubes, the first is the parent of the second in the hierarchy. How do I aim the relativePath parameter at the child cube?

Here is what I have tried, the code is in a script attached to the parent cube.
Code (CSharp):
  1. private void Test()
  2. {
  3.     AnimationCurve curve = new AnimationCurve.Linear(0, 1, 2, 3);
  4.  
  5.     clip.SetCurve("", typeof(Transform), "localPosition.x", curve);
  6.     clip.SetCurve("Child", typeof(Transform),...
Using AnimationClip.SetCurve on child object.

Viewing all articles
Browse latest Browse all 1466670

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>