Rotate relative to parent?

I know that when rotating you can choose Space.Self or Space.World. But what if I need to rotate relative to the object’s parent. Space.Parent doesn’t exist, so is there a workaround through code?

use transform.localRotation instead.

3 Likes

Hi Maldorma,

I think what you’re looking for is something more like this:

transform.RotateAround (transform.parent.position, transform.parent.up, degrees * Time.deltaTime);

Here’s the link to the doc if you need it:

Hope this helps, :slight_smile:
Nathan

2 Likes