Vnyxx
(Vnyx)
1
as the title says how do i add to a CFrame position relative to lookvector?
this is my code
viewmodelHead.CFrame = CFrame.new(Camera.CFrame.Position + Vector3.new(0, 0, 0 + blockPositioning)) * Camera.CFrame.Rotation * CFrame.Angles(math.rad(TurnX), math.rad(TurnY), 0)
for example, when doing this, Camera.CFrame.Position + Vector3.new(0, 0, 3.2)
. i want the 3.2 offset to add like the picture shown
kalabgs
(FartFella)
2
You multiply it with a cframe rather than adding it as a vector
viewmodelHead.CFrame = CFrame.new(Camera.CFrame.Position) * CFrame.new(0, 0, -blockPositioning) * Camera.CFrame.Rotation * CFrame.Angles(math.rad(TurnX), math.rad(TurnY), 0)
Vnyxx
(Vnyx)
3
it still does the same thing, it didnt work
kalabgs
(FartFella)
4
From the code i see that you are trying to position it infront of the camera am i right?
if so then do this
viewmodelHead.CFrame = Camera.CFrame * CFrame.new(0, 0, -blockPositioning) * CFrame.Angles(math.rad(TurnX), math.rad(TurnY), 0)
1 Like
Vnyxx
(Vnyx)
5
yeah i forgot about that, thank you
system
(system)
Closed
6
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.