- Home /
Rotation multiple points, help needed
Hi!
I'm trying to make an object which can rotate/move at 3 different points. As you can see at the picture below.
But my problem is when I rotate 1 point it rotates the whole object, but I want just that point to change position/rotation. So when I change the Y-axis at point 1, I want only that point to go up and the others just have to be static at their points.
Hmmm ... Can you clarify the idea a bit better? Are these points separate objects? What's their relation to the large red rectangle?
The points 1,2,3 are "Screws". The red object is where they are connected you. So when you twist screw 3, you would change that position/rotation and I want it to have effect on the red object. So it rotates, but point 1 and 2 have to stick at the position. Only when you "twist" them they have to change position
I need to set 3 X, 2 Z and 1 Y position for the $$anonymous$$ain Object. And I need to be able to change them
Answer by ShadoX · Mar 19, 2014 at 11:23 AM
Looked for something similar recently, the trick is to spawn another empty game object and use it as the pivot via
https://docs.unity3d.com/Documentation/ScriptReference/Transform.RotateAround.html
so something like
transform.RotateAround(pivot.transform.position, Vector3.forward, -120);
will rotate the object around, the pivot game object, all you have to do is to calculate the position of the pivot and set it at the desired spot :)
[edit] sorry, seems like I got the wrong idea, but perhaps that might be still of use for you
Thanks for your help, but I got 3 different points to rotate around. I think this will come in handy. I'm gonna take a look at it.
Your answer
Follow this Question
Related Questions
Flip over an object (smooth transition) 3 Answers
Distribute terrain in zones 3 Answers
Multiple Cars not working 1 Answer
Camera Control/ Rotation C# 0 Answers
How to make the player rotate to where an object is being thrown? 1 Answer