Guys someone can help me how to make this in the video below:
What can I use to be doing something similar to this
Guys someone can help me how to make this in the video below:
What can I use to be doing something similar to this
It seems like a SurfaceGUI on a part. Once they click the part, you can tween the camera into the position that u desire.
Ye, but how i can move the camera?
(Local Script)
local camera = workspace.Camera
local desiredCFrame = CFrame.new()
camera.CameraType = Enum.CameraType.Scriptable
camera.CFrame = desiredCFrame
oh, but how to make the camera follow my mouse? same in the video
To make the camera follow the mouse we first need to know where the mouse is.
local MouseLocation = UserInputService:GetMouseLocation()
local FarVector = Vector3.new(1, 1, 0)
local Mouse01 = FarVector - (Vector3.new(MouseLocation.X/Camera.ViewportSize.X, MouseLocation.Y/Camera.ViewportSize.Y, 0)*2)
This gets the mouse’s position on screen and will shrink it down to a vector2 which can go from -1,-1 to 1,1.
Translating this to camera rotation isn’t hard either.
local DesiredMaxAngle = 15
local MouseAngle = CFrame.Angles(0, math.rad(Mouse01.X*DesiredMaxAngle), 0) * CFrame.Angles(math.rad(Mouse01.Y*DesiredMaxAngle), 0, 0)
Hope this helps with some of the math involved!