Sonic The Hedgehog

i have a little character. I want him to be able to stay upright to the ground when he walks, such as if he goes up a ramp, tilt with it, or if he goes through a loopdy loop, a la Sonic, to go from upright to upside down and upright again. How do I do this?

http://download.blender.org/documentation/NaN_docs/BlenderGameReference/realtimebuttons.html
look for rot fh

I’ve tried and it didn’t work me. However in every tutorial I read, they say it should do you upright thing…
Can anyone help?

It’s really complicated… unless you’re good at hardcore maths.

You have to remember, in older games they may not have had computational power, abstract coding and 3D modelling environments, but they did have hardcore mathmaticians doing physics stuff…

Basically it involves getting the angle of the plane below the player using a Ray sensor, and adjusting the Orientation of the player to match, if velocity is over a certain ammount. based on the angle of the piece of terrain and velocity of the player you may want the player to fall or slide down the loop the loop. and disallow player control until they hit the ground…

You could spend a week thinking up a clever way to use empties/rays and trackto actuator but the result wouldn’t be water tight…

good luck