Hello,
While running/walking and then turning its fine,
However, while idle/stand still and then turning, the character does a 90 degree turn.
The gameplay I am attempting to accomplish is that the character would turn gradually, for example by 10 degree increments, similarly to while running/walking and turning.
Is there a hack or some other options that we can add to make this possible please?
It is very imperative that I have this work smoothly
Thank you
Comments
Otherwise, if all you mean is you want the Turn speed to be lower when standing, you can do that through script:
void Update ()
{
if (KickStarter.player.GetMoveSpeed () < 0.1f)
{
// Standing still, lower turn speed
KickStarter.player.turnSpeed = 2f;
}
else
{
// Moving, raise turn speed
KickStarter.player.turnSpeed = 5f;
}
}
I used it to debug the speed and figure out where the difference is.
So, if I just press the A- or D once the character does the 90 degree turn I was referring to, if I hold the A or D the character does turn with the same speed as when running/ walking, I guess what I am attempting to change is when its at stand still and A or D is pressed to only rotate a bit rather than the whole 90 degree.
I checked and Turn instantly is unchecked in the settings manager,
If you can please help me out with the script to control this turn that would be great,
Thanks again
The character now only turns a small amount when A/D pressed, this with a combination of the other script you provided can be used in conjunction to make it as slow/fast as needed,
Out of performance question, will this be ideal to remain in an update function rather than to have an option somewhere in your character movement such as turn instantly, to turn gradually? Just curious,
Thank you very much for your help.
Hi Chris!
The link above is not working now and I have same issue with only 90 degree turn as kici said.
Can you please send me the script to tweak character turning? I assume I add the script to the character?
Thanks,
Jakub
Apologies, but I don't believe I still have it. Perhaps @kici still does?
I will ask him, thanks.
OK, looking forward @kici .
@jakub I've actually tweaked a lot in my script, but I believe the part you are looking for is this:
Of course you can change the isReversing to KickStarter.player.GetMoveSpeed () < 0.1f or whatever it is you are trying to achieve.
The other thing in my script changes is when player reversing and turning I have the axis reverted so it gives the natural reverse turn, according to my standards lol.