I am trying to make a plane engine with a spinning turbine but I’ve run into an issue. Whenever I set the CFrame value above 4 the turbine rotation speed slows down and it starts shaking. is there a better way to do this or is this the right way to go about this?
Script:
while true do
script.Parent:SetPrimaryPartCFrame(script.Parent.Part.CFrame * CFrame.fromEulerAnglesXYZ(4.9,0,0))
wait()
end
The Rotation doesnt seem to be slowing down, it appears to be just the object is moving so fast that I gives the illusion of it slowing down, which happens. (no, paying closer attention that is not the case, maybe however.)
But a couple of things, :SetPrimaryPartCFrame() an wait() is Deprecated, and should be replaced with :PivotTo and task.wait(), task.wait() is better with faster speeds than wait() and would be equivilent to RunService.Heartbeat:Wait().
You can also use CFrame.Angles() instead of CFrame.fromEulerAnglesXYZ() as they are basically the exact same thing and formatted in the exact same way using Axis.
The rotation isn’t slower, but it’s what happens when your frame rate almost matches the turbine position.
If you are watching it at 30 frames/second and the rotation angle each frame matches the exact angle of the blades (18 blades = 20 degrees each blade, or any multiple of this number) then the blades will actually appear stationary. You can tell by the spiral on the the hub which is still showing as spinning faster.
The reason it’s shaking is that your center of rotation isn’t exactly at the center of the turbine mesh. It’s showing up as the shaking.
Basically depending on how fast it goes, you increase the transparency of a turbine and decrease the transparency of motion blur decal to give an illusion of it going faster.
Although this may not be the answer to your question I would recommend using RunService instead of a while loop as it is more controllable and reliable.