I tried to make a y-axis scrolling camera but with my Lua knowledge, I can only make an x-axis scrolling camera. Can someone please help me?
1 Like
I dont understand, if you know how to manipulate the camera on x-axis, then just change y-axis now. Could you show your code? or give more information on whats your goal?
is this what you mean
-- client
local UserInputService = game:GetService("UserInputService")
local RunService = game:GetService("RunService")
local Camera = workspace.CurrentCamera
local Sensitivity = math.rad(1)
UserInputService.InputChanged:Connect(function(Input, GameProcessed)
if Input.UserInputType == Enum.UserInputType.MouseWheel then
Camera.CFrame = Camera.CFrame * CFrame.Angles(
Input.Position.Z > 0 and Sensitivity or -Sensitivity,
0,
0
)
end
end)
you can customize it for the other x
, y
, and z
on the CFrame.Angles
part
Yes, it is. Thank you. In my game I will add you to the credits menu even tough you are not in my group.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.