Is it possible to make responsive character controller?

Hello guys !

I searched for ages… but I didn’t find the correct way to have the player character to switch to the opposite direction pretty much instantly.

  • CFrame works like a charm but the physic isn’t considered. And I have high doubt about how efficient it is to check each time if there is a collision. Well it’s not anyway, but it could be even worst if they brute force it.
  • Move function… is the default thing in the base controller… would probably would have been enough if you could tweak the rotation speed. But, except if I really messed up, we can’t…

I tried some mix and read a lot of doc hoping to find something.
But now that I write this message, I have two things that may not broke everything.

  • Linear velocity should be the good answer, but of course you won’t be able to climb or stuff. I’m afraid of how much it would break everything.
  • Just though about using CFrame or maybe AngularVelocity (CFrame would be best), to manage the rotation. And then use the move function ?

Well I’m going to sleep and I’ll try again tomorrow. If anyone has already encounter the problem, I’ll be happy to hear anything ^^
Have a nice day !

1 Like

Have you thought about making your own player movement script? Basically just remaking the WASD

I’m not sure where you’re going, because the value of the move vector in the default controller is the one I want. But they use the player:move to apply it, and that’s why it doesn’t work.
I don’t say that lightly, because if you modify the cframe with the same vector… the movement is just fine (but obviously doesn’t care about physic).

I finally got a few minutes to test the CFrame lookat + move and it’s working as expected.

if moveVector ~= Vector3.zero then
        local playerPosition = Players.LocalPlayer.Character.PrimaryPart.CFrame.Position
	Players.LocalPlayer.Character.PrimaryPart.CFrame = 
		CFrame.lookAt(playerPosition, playerPosition + moveVector, Vector3.yAxis
	)
end

self.moveFunction(Players.LocalPlayer, moveVector, false)

Is the move function a good idea in my usecase ? We’ll see, but for now I’ll keep using it.

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