Hi guys,
I'm currently doing a fan-fic of Sonic the Hedgehog. As you probably know, Sonic is able to run enormously FAST and capable of running up walls, ceilings, loopings and so on. I've got the gravity in place, the overall movement is up and running, but I need to get the TILT and ROLL angles right for my model, because its feet are supposed to face the ground at any time, even while running in a looping (so at the highest point of a looping, the model is supposed to be upside-down, when running up a wall, feet, body and head should be aligned in a horizontal manner instead of a vertical and so on).
So, I had a look at the c_trace-command. It modifies the "target" vector and the "normal" vector, the latter giving us the normal of the hit surface (therefore the normal of the surface we are currently walking/running on). The question is: how do I convert the normal vector of the surface the model is currently walking on into tilt and roll angles so that Sonics feet point towards the ground?
Greets and thanks in advance!
Alan