I try to animate the world position and rotation of a game object.
I saw in the documentation that I can use localPosition.x etc. to animate the GameObject in local space and some obscure remark that “For performance reasons Transform position, rotation and scale can only be animated as one property.”
How can I set an animation curve that will move and rotate a game object in world space?
I think you can disregard it (that doc wasn’t written by me, so I don’t know for sure) Just set multiple properties (i.e. some position curves and some rotation and everything will work as you expect it). IMHO, what it means that AnimationClip always controls whole transform - you can’t have one clip for animating position and another clip for animating rotation, i.e. animations for one transform has to be in one clip.
And regarding my main question,
Is there a way to animate the rotation property of a transform, i.e using an AnimationCurve to set the global rotation and not just the local one?