OkCam - A freecam with mobile support

This script requires the latest version of the PlayerModule otherwise :GetMoveVector() always returns (0, 0, 0) for mobile

Setup: Just put this script in ServerScriptService
Get it on Roblox

Advantages:

  • Support both ClassicThumbstick and DynamicThumbstick.
  • Ignore Thumbzone when rotating the camera.

Disadvantages:

  • PlayerModule and ControlModule is required
  • Used TouchMoved instead of TouchPan (doesn’t work on studio btw)

Preview:
ezgif.com-gif-maker

32 Likes

Update V0.0.1:

  • Better thumbstick detection
  • Fixed some bugs

New version need to be placed in ServerScriptService for now :upside_down_face:

1 Like

Update V0.0.2:

  • Used ContextActionService instead of TopbarPlus
  • Updated Demonstration video

Update V0.0.3:

  • Gamepad supported press ButtonL1 & DPadRight at the same time to toggle

You are no intermediate programmer. If you’ve got the strict luau thing figured out here, and you coded functions like adjustTouchPitchSensitivity yourself, which is a math function I can’t figure out the contents of, you’re really good.

This is a huge help. I’ve been wanting to use the default freecam with mobile support forever because I want my game to be in freecam mode by default. Thanks a ton!

3 Likes

Update V0.0.4:

  • Rewrote the entire script
  • Fixed GetMoveVector() returns X & Z values above 1 or below -1
2 Likes

This is nice I have some suggestions to make it better.

Add this in FreecamScript to hide the touch controls and top left button, they don’t need to be visible to work.

game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.All,false)
if game.Players.LocalPlayer.PlayerGui:FindFirstChild(“TouchGui”) then
game.Players.LocalPlayer.PlayerGui.TouchGui.TouchControlFrame.Visible = false

Move the freecam button to the bottom right corner of the screen and make it mostly transparent while in freecam, and remove the speed button(unnecessary because the thumbstick controls the camera speed perfectly.

Make it return the the players original camera zoom distance, it’s to close, the official roblox freecam does this.

Thanks for the suggestions but hiding the touch controls won’t work as intended, I added an option called EMOTES_MENU_ENABLED when you set it to false it will disable the top left button.
It’s updated

Thanks, but Pan does not work on PC with this version.

I tested the previous and it does work with TouchControlFrame.Visible = false on PC and mobile.

This should be fixed for now

This only works with DynamicThumbstick. I will make my own DynamicThumbstick if you want to