Rotating an object not in the center

So I tried making a wind turbine for fun, I just ran into one small issue: when the turbine spun, it spun around the center of itself, not the center of the blades. How do I fix it so it centers around the turbine and not itself? Sorry if this isn’t explained well, I have no idea how to word it.
image

1 Like

This is the script, as you can tell I am not a scripter.

First off, the best thing to do is make it two separate objects. Next, after looking at the blades, they might not be symmetrical.

1 Like

I’ll try the first thing, but the blades are symmetrical.

You can see the length is longer than the width.

Ensure the two downward-facing blades are orientated at 120 degrees and are originating from the centre point of the sphere. However, from what I can see, they are symetrical.

1 Like

You can separate it into 4 objects, the center part and 3 blades. Put them into a model and set the center part as the primary part of the model, and anchor it. Then unanchor the 3 blades and weld them to the center, and manipulate the CFrame of the primary part (the center) how you want.

That’s if you want to do it with CFrames, perhaps you can use BodyMovers or a Motor to achieve the same in a more physical way.

2 Likes

This is happening because the x axis and the y axis are not equal so the center is offset as shown in the image below were the 2 points intersect is the model center point.

image

You can either try to align the model with the center or what I would recommend name the center part that it will be rotating on and rotate the center part directly. Then weld all the other parts that need to be rotated with the center part. Make sure that only the center part is anchor

image

I am only rotating this part here but because the blades are welded to it they will rotate with it
image

Code:

local Part = script.Parent.Center

while true do 
	wait() 
	Part.CFrame = Part.CFrame * CFrame.fromEulerAnglesXYZ(math.pi/35, 0, 0)
end

I would also recommend you to look into tween service instead of using while true do look. Click here

Hope this help,
Sorry if I did not go in depth but this was a quick reply.

2 Likes

This was in depth enough for me. I never knew what welds were for before but I sure do now. Thanks a lot!

1 Like