How to create CFrame using Position and LookVector

Hello
I have a Position Vector (X, Y, Z) and a LookVector (e.g. 0.4, 0.7, -0.3)
How can I create a CFrame using these 2 vectors?

Thanks

2 Likes
local cframe = CFrame.lookAt(Position, Position + LookVector)
2 Likes

local position = Vector3.new(1, 2, 3) – the position vector
local lookVector = Vector3.new(0.4, 0.7, -0.3) – the look vector
local upVector = Vector3.new(0, 1, 0) – the up vector

local cframe = CFrame.new(position, position + lookVector, upVector)

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.