- Home /
Rotating an object using other object's position as pivot
Hey everyone, is there a possibility to rotate an object using other's position as pivot without parenting this object to an empty and rotating the empty? What I wanted to do is the following:
So the position should be the turret's position and the big spider should rotate using this as pivot.
There's a way I can do this by code?
Thanks for any help !
Answer by DaveA · Jun 18, 2012 at 07:15 PM
Sure you could do it in code. Just reference the other object and adjust your transform accordingly. You could go either way: with the script on the pivot or script on the orbiting object.
Your answer
![](https://koobas.hobune.stream/wayback/20220613072943im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
How do I rotate on a new pivot point with RotateAround? 2 Answers
How to rotate around the parent in 2D? 1 Answer
Rotate camera around player (Paranted) 0 Answers
Not rotating around the correct pivot point? 2 Answers
Trying to rotate player, how? 0 Answers