I’m making a topdown game and wanted to make the camera’s angle change with the mouse position to add a little atmosphere to the game but it’s causing some problems with the character movement since it’s relative to camera by default and I think I saw an option somewhere that makes movement not relative to camera. I assume that’s not what I should do.
Instead, maybe make my own control script?
Please note that I’m holding only the [A] button (Walking to the left)
Any suggestions are appreciated.
Thanks in advance ^-^
Fork a copy of the PlayerModule (if you haven’t already) by playing the game like normal, copying the generated one from StarterPlayer.StarterPlayerScripts and pasting it in the same place in studio mode
Go to PlayerModule.ControlModule.BaseCharacterController in the Explorer hierarchy. Open it up, and you should see this function starting on line 17 of the script:
function BaseCharacterController.new()
local self = setmetatable({}, BaseCharacterController)
self.enabled = false
self.moveVector = ZERO_VECTOR3
self.moveVectorIsCameraRelative = true
self.isJumping = false
return self
end
Change self.moveVectorIsCameraRelative to false, and that should fix it.