As part of my game is in 2D mode, I am implementing the 2D player Direct Control. I found the default AC 2D controller really awesome. But as the title describe, I am trying to make the player "slide a bit" with deceleration when changing direction, especially when changing to the opposite direction.
I tried unchecking Turn instantly when under player control?, but I wish the player not to make a U-turn with an obvious radius. Is it possible to make the player takes time to make a U-turn but with zero radius?
On the other hand, may I use AC.KickStarter.player.charState to control when the deceleration comes into effect? Or are there other ways to add some script or modify Char.cs to achieve the goal?
Thank you very much for your help.
Comments
https://imgur.com/a/T190h35
When I press the direction button opposite to the traveling direction (e.g. at about 1:00 second or at the 0:06 timestamp), the sheep would not immediately travel in the opposite direction. Instead it would decelerate in the traveling direction, then accelerate again in the opposite direction.
I notice AC already has the deceleration when the player is stopping from walking, and has the acceleration when the player begins to walk. Can adding some code achieve the above effect? As well as when the player change traveling directions, it will experience a deceleration in the original traveling direction, and accelerate in the new direction?
Thanks a lot.