Title explains it all. How do i get this to rotate world space instead of local space?
RotateCFrame = Object.CFrame * CFrame.Angles(RotateIncrement, 0, 0)
Title explains it all. How do i get this to rotate world space instead of local space?
RotateCFrame = Object.CFrame * CFrame.Angles(RotateIncrement, 0, 0)
You may want to read this article!
It outlines what you need by explaining methods such as: CFrame:ToWorldSpace()
CFrame:ToObjectSpace()
In an example code segment, you may want to do something like this:
local partToRotate = -- path to part
local rotateIncrement = math.rad(1)
game:GetService("RunService").RenderStepped:Connect(function()
local rotateCFrame = CFrame.Angles(rotateIncrement, 0, 0)
partToRotate.CFrame = partToRotate.CFrame:ToWorldSpace(rotateCFrame)
end)
Ahh, i see. Thank you!
(30 chars)
It doesn’t rotate in world space. It still rotates in local space (The object’s axis)
use
Rotation = Part.CFrame.LookVector * RotSpeed
or
Rotation = Part.CFrame:VectorToWorldSpace(Vector3.new(0, 0, -1)) * RotSpeed
Sorry for bumping because this is the top of google search. (And the answer rotates in local space based on the partToRotate.CFrame axis)