as the title suggests I am trying to rotate a plane around a point but the result is not what I expected.
With my editor I create a main mesh (which is the one with the red outline). Then using the four vector3 represented by the white spheres I create a second mesh. Now I need to rotate this mesh on the point where a gray sphere is located. With
Vector3 myCenter = Vector3.Lerp(point1, point2, 0.5f)
I find the center of the two Vector3. Using a button I would like to rotate the mesh one degree at a time. I thought I could do it using
myMesh.transform.RotateAround(myCenter, [Vector3], 1f)
but any [Vector3] I use the mesh rotates to the point defined by myCenter but moving to the right or left. I can't find the correct value for [Vector3]. Is it possible that [Vector3] needs to be changed every time the mesh moves one degree? Can you help me?
Vector3
should be(Sphere1.position - Sphere2.position).normalized
, so you've already worked it out when you foundmyCenter
– Immersive