Mesh not spinning correctly due to hitbox, how can I fix?

Salutations ! I am trying to make a ventilator, so I imported a mesh of some blades in roblox and made a script for them to spin, but I noticed that it didn’t spin correctly.
com-video-to-gif
As you can see, the blades are not spining from the cylinder in the middle, that’s what I’m trying to achieve.

Is there a way to fix this ? Please help.

2 Likes

Could you not import just one blade and duplicate it three times, then put it around the center part in a model and make the center part the models PrimaryPart?

2 Likes

You Can turn it around a fixed point

1 Like

I would recommend making a model where you put the fan and a part in the centre of the fan, then making the Part in the centre the primaryPart of the model and then Using Model:SetPrimaryPartCFrame to spin it.

3 Likes

The root of the problem is that the focal point of the propeller is not positioned at the centre point of the mesh’s bounding box. This causes the propeller to appear to rotate off-axis because the mesh spins around the bounding box’s centre point.

To help communicate why this is an issue, I’ve created the illustration below. The point where the red lines meet represents the bounding box’s centre point, with the illustration on the left depicting the current situation and the illustration on the right depicting the ideal configuration.

As @TheLoneNeighbour has touched on, grouping the propeller components and then setting the group’s primary part to the cylinder should help resolve the issue. By then adjusting the primary part’s rotation using :SetPrimaryPartCFrame(), the enitre propeller model will instead rotate around the cylinder.

7 Likes

Yes, I believe Craftero’s point is correct. The central point of the blades is irregular. You have to set the blades in an exact point for it to rotate correctly.

That would still spin weirdly in my view (since your representation is still rectangular), my recommendation for this is to try and set the correct origin point in blender.

Right click on your model from Object Mode. ( Ctrl+Tab, select “Object Mode” )
and clicking the button presented below.

If it’s still not centered then try to do it by yourself by moving the 3D Cursor to the center manually then,

image

applying the following setting.

image

If I did not understand what you said clearly, the fix for unions (if you used one) is to simply not uniting them and keeping them as separate parts.

1 Like

That is incorrect and you must not have read my post in its entirety as the image provided is for the purpose of explaining the source of the issue and doesn’t directly relate to the solution.

When a primary part is set and manipulated, the dimensions of the model’s bounding box, be it cubic or rectangular in shape, are irrelevant and do not interfere with the primary part’s axes of rotation.