I’m trying to implement controller support for a world map in my game. As the player moves the left thumbstick, the camera moves. Simple as that. It works as I had hoped for the most part, but the only problem is that it doesn’t stop once the player stops inputting a direction on the stick. Here is the current code that controls the movement:
--uis = UserInputService
uis.InputChanged:Connect(function(inp)
if inp.KeyCode == Enum.KeyCode.Thumbstick1 then
--dunno why x needs to be negative here but it does lol
padMove = Vector3.new(-inp.Position.X, 0, inp.Position.Y)
end
end)
This seems to be the most widely accepted form of this script. However when I use it, padMove isn’t reset to zero when I stop moving the thumbstick.
It is worth noting that I am using the built in Controller Emulation feature in Studio, so maybe that has something to do with it? Not sure.