How to temporarly disable camera drag?

  1. What do you want to achieve?
    disable camera drag temporarily while the camera still follows the player

  2. What is the issue?
    I cant disable the camera drag without disabling the camera moving, if it doesnt move it wont follow the player anymore

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    I tried looking if there is a setting for it or if there is somebody that tried doing it before but couldnt find anything

note that the drag is meant to be disabled after the player is holding the screen, so using a ui wont work

also note that the player can move when this happens so Idk if setting the camera to scriptable would work

this is for a charged shot for mobile, the one for pc is done and works well because click doesnt move the camera unlike mobile. everything for the mobile charged shot is done and works well except this

1 Like

I managed to find a fix. this is something similair to the solution I used

function startcharge()
 something:FireServer()
 camera.CameraType = Enum.CameraType.Scriptable
 local campos = camera.CFrame.Position - roo.CFrame.Position
 local camorient = Vector3.new(camera.CFrame:ToEulerAnglesXYZ())
 repeat
  camera.CFrame = CFrame.new(campos+root.CFrame.Position) * CFrame.Angles(camorient.X, camorient.Y, camorient.Z)
  task.wait()
 until camera.CameraType ~= Enum.CameraType.Scriptable
end

function shoot()
 anotherthing:FireServer()
 camera.CameraType = Enum.CameraType.Custom
end

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