How can I, instead of adding the vector that’s relative to the world’s x,y, add the vector that’s relative to the camera?
local Point = {MT={};PT={
AddVector = function(V,O,DT)
P = {}
P.X = O.P_X + V.X * DT
P.Y = O.P_Y + V.Y * DT
P.Z = O.P_Z + V.Z * DT
return P
end;
}};
5uphi
(5uphi)
2
You can use VectorToWorldSpace
local objectSpaceVector = Vector3.new(10, 0, 0)
local worldSpaceVector= workspace.CurrentCamera.CFrame:VectorToWorldSpace(objectSpaceVector)
part.Position += worldSpaceVector
or
part.Position += workspace.CurrentCamera.CFrame.RightVector * 10