wpad.CFrame = CFrame.new(workspace[admin].Torso.Position) * CFrame.fromEulerAnglesXYZ(0,math.rad(i),0) * CFrame.new(0,0,-dis) * CFrame.Angles(math.rad(i),math.rad(i),math.rad(i))
I cant figure out why we multiply here, can anyone explain please?
wpad.CFrame = CFrame.new(workspace[admin].Torso.Position) * CFrame.fromEulerAnglesXYZ(0,math.rad(i),0) * CFrame.new(0,0,-dis) * CFrame.Angles(math.rad(i),math.rad(i),math.rad(i))
I cant figure out why we multiply here, can anyone explain please?
CFrames are a rotation matrix; you are multiplying matrices. The second matrix translates the first in relative object space.
CFrame.new(workspace[admin].Torso.Position) is a frame without rotation
CFrame.fromEulerAnglesXYZ(0,math.rad(i),0) rotates it about its own relative Y axis
CFrame.new(0,0,-dis) moves it relatively backwards
CFrame.Angles(math.rad(i),math.rad(i),math.rad(i))is another rotational factor
This discussion is preserved as it was. New answers, comments, and votes are closed.
2 comments
Is this to find the distance of one object from another?
No, that is entirely irrelevant to what this is.