Ani.Mate relativeTo

Hi, just wondering if it was possible to combine an Ani.Mate.By command which translates an object:

yield Ani.Mate.By(this.transform, 0.5, {"position": new Vector3(0,0,10)});

with

relativeTo : Space = Space.Self

so that the object would animate by 10 along its local z axis instead of the global one?

Thanks for any help :slight_smile:

bump

You can use TransformPoint to convert from local to global coordinates.

Ani.Mate.By(transform, 0.5, {"position": transform.TransformPoint(new Vector3(0,0,10))});

Brilliant, thatโ€™ll do nicely :smile: