iOwn_You
(iOwn_You)
August 30, 2021, 1:28pm
#1
I’m trying to use a viewport to show a model and I need it to show the right side of it
for the purpose of simplfying things i’ve been testing the camera script on workspace
ive tried that;
game.Workspace.Camera.CFrame = CFrame.lookAt(game.Workspace["Lee Enfield"].Rifle.Position ,game.Workspace["Lee Enfield"].Rifle.CFrame.RightVector)
also added offsets to the position and messed around with that line, that didnt work, it doesnt look directly at the right side of the weapon
I think this should work
game.Workspace.Camera.CFrame = CFrame.lookAt(game.Workspace["Lee Enfield"].Rifle.CFrame * CFrame.new(1,0,0), game.Workspace["Lee Enfield"].Rifle.Position)
i think you just had the at and lookat parameters back to front
sorry for edit
tictac67
(tictac67)
August 30, 2021, 1:50pm
#4
It should be CFrame.new()
rather than CFrame.lookAt()
game.Workspace.Camera.CFrame = CFrame.lookAt((game.Workspace["Lee Enfield"].Rifle.CFrame * CFrame.new(1,0,0)).Position, game.Workspace["Lee Enfield"].Rifle.Position)
Sorry, I forgot I left the first argument as a CFrame instead of Vector3.
Also changing the value of the CFrame.new(1,0,0) x value will increase the distance the camera is from the model.
1 Like