Hello, I’m trying to make a building system and I am implementing a drag feature for mobile users to drag the location of objects they want to build however its also dragging their entire screen.
How do I lock it so the drag on the element doesnt drag their screen but if they use a second finger, the camera would follow that second finger?
Try detecting of the player is moving a object and then lock their camera until there is no detection of movement of an object. I think you can use if statements and printing. Sorry if this is confusing, i’m new to lua
You can try to set the camera to a certain block to look at the build while being fixed. After that, you can try to make a block move with user input or mouse movement. I already have a scrip for if you want to make it fixed not that big you can implement it in your script.
local camerapart = --/ the part you want to look from
local Camera = workspace.Camera
local OldCam = Camera.CFrame --/ for if you want to reset it
repeat wait()
Camera.CameraType = Enum.CameraType.Scriptable
until Camera.CameraType == Enum.CameraType.Scriptable
Camera.CFrame = camerapart.CFrame
When you tap on a GUI element on roblox on mobile and drag it doesnt move the camera.
I am thinking of replacing the billboardGui with a 2d GUI element with a while loop to constanty set the position of it to be in the position of thr 3d object with a raycast. This will replace my current billboardGui. so when they hold down on the 2d gui it doesnt drag the camera, but still lets them drag the camera using a different finger
I put the active property on both the GUI inside the billboard gui and the billboardGui itself but it still doesnt sink the input. I think I might have to replace the billboardgui with a while loop that positions a 2d GUI to be on the 2d version of the 3d position through constantly updating it with a raycast