When in slow-motion sometimes the character's horizontal velocity goes to 0.0 for a single frame and a transition to Idle state starts. This creates an effect as if the character is faltering for a sec. When I plug in a controller before I start Unity the bug fixes. Then when I unplug the controller while the Unity Editor is running, the bug is still fixed.
I've created a workaround, so that the "HorizontalSpeed" property of the character does not return the magnitude of the horizontal velocity of the character, but instead returns the calculated "currentHorizontalSpeed".
Edit: I found out what the problem is. The CharacterController component internally stores the last two positions of the character and the time that was needed for the character to move from the first position to the second position. This information is enough so that the velocity of the character can be calculated. In slow motion however, these two positions sometimes are equal, because the character is moving really slowly. This way the calculated velocity results in 0.0, and the Idle animation of the character start to play for a single frame. However I don't know why this bug is present only when no joystick controller is plugged in.
I fixed the issue. Apparently it was bug connected with the Min Move Distance of the built-in CharacterController. The fix was just to set the property to zero.
When in slow-motion sometimes the character's horizontal velocity goes to 0.0 for a single frame and a transition to Idle state starts. This creates an effect as if the character is faltering for a sec. When I plug in a controller before I start Unity the bug fixes. Then when I unplug the controller while the Unity Editor is running, the bug is still fixed.
Edit: I found out what the problem is. The CharacterController component internally stores the last two positions of the character and the time that was needed for the character to move from the first position to the second position. This information is enough so that the velocity of the character can be calculated. In slow motion however, these two positions sometimes are equal, because the character is moving really slowly. This way the calculated velocity results in 0.0, and the Idle animation of the character start to play for a single frame. However I don't know why this bug is present only when no joystick controller is plugged in.