HI DEVS,
the tittle says it all and also I did my research but I didn’t quite understood ROBLOX’s definition
HI DEVS,
the tittle says it all and also I did my research but I didn’t quite understood ROBLOX’s definition
CFrame.fromAxisAngle() allows you to define your own axis of rotation and apply a rotation to the CFrame on that axis. Think of it as you’re drawing a line from the Base Part you’re changing the CFrame of to the location of the unit vector, this line is the axis of rotation.
local vector = Vector3.new(0,1,0) --Vector Input must be a Unit Vector, in this case this is forming a rotation axis on the Y-Axis
CFrame.fromAxisAngle(vector,math.rad(90))
so this will rotate 90'
on the +Y
axis?
Yes, it will rotate on the axis you provided.
whats the difference between CFrame.Angles
and CFrame.fromAxisAngle()
?
You provide your own axis instead of defining the rotation on the 3 defined axises.