I’ve noticed that most amateur games make the turning a little…funny. What people do that is the easiest is to, whenever the character turns, will just rotate the character by the z axis by n degrees…I find this a little annoying if it’s supposed to be a realistic game, so how would you make a character turn realistically? maybe just turning the head and body?
When standing still, turn just the eyes for very small turns, then the head till about 90 degrees, followed by the shoulders and the rest of the body, with the feet still in place, till about a bit less than 180, and past 180 walk in place to fully turn. For walking, it’s similar but with much smaller angles, and even bellow the thresholds the turning propagates very shortly all the way down to the feet with just a very small delay between head turning and changing of walking direction (don’t forget to take momentum into account though).
edit: and if standing still while having turned close or beyond the limit for the neck for more than a certain time, turn the rest of the body including the feet.
All of that i gathered from a quick observation of my self looking around and walking around the house just now; might be a good idea to get a bit more input in case i’m some sort of freak that turns weirdly or if i made some mistake in my observations.
have a realistic turning motion action,
then setup like this using a property to play it
if keypress-(right) -------and-----assign property “Turn” = 1
if “Turn” min:1 max: (end frame-1)-and-----add 1 to “Turn”
if “Turn” = end frame—and-------assign “Turn” 0
if “Turn” is changed----and-------Action -Property based - “Turn”
then you can apply the impulses using
if “Turn” = any-------and---------Apply motion
this way it can be bursts of force,
and then there is this…
If you want to do it “realistic” you need a “turning” animation. I guess you can look at the animation sub-forum how they do it for movies.
The main problem is that at a certain stage you have to know how much the character will turn, to play the correct turning animation.
As a simplification, you might be able to create discretionary turn steps. E.g. you cut the animation into left turn with angle on left food (leftTurnL) and left turn on right food (leftTurnR). So you get a sequence of
leftTurnL+ leftTurnR + leftTurnL + …
This sequence will result in discretionary turning angles, as (even for a human) it is difficult to stop a turn while performing it. To get an intermediate turning angle you need to add a smaller turn to the sequence.
leftTurnL + leftTurnR + leftTurnSmallL
Now you need the transition from beginning, which can be standing, walking, running, kneeing, sitting …
StandingToLeftTurnL + leftTurnL + leftTurnR + leftTurnSmallL
And you need an animation to end the turn:
StandingToLeftTurnL + leftTurnL + leftTurnR + leftTurnSmallLToStanding
So you need pretty much animation snippets. They have to fit together. You need to play them to show a natural animation.
You need more animations for different walk radius as a turn on place is different as a turn while walking.
Why it is not done this way
This is a lot of work. It is much simpler to let the character play a walkcycle (with blending from standing) and turn the character while walking. In most games this will be accepted anyway. Indeed there are games like adventure that can benefit from such animations.
Next problem: take care of the ground which is not necessarily a flat face ;).
But I’m not an expert in character animation. I suggest to dig through the animation forums (not just the forums related to Blender)
With using real physics to move, then you have your cake and eat it as well, however this is complex stuff to try and wrap your head around,
My torqueRig is Mit 3.0 and just needs some one with MUCH more time to tinker with it,
it uses a lot of logic, and a little python. (isn’t he cute?)