I seem to suck at it, apparently. I'm trying to get an entity to move around with zero gravity, but on certain angles it stops turning and is super sensitive. Probably those crazy angles working me over again. Heres the code:
Code:
vec_set(temp3.x,nullvector);
vec_to_angle(temp3, normal);
vec_set(temp3.pan,my.pan);
// Adapt the player angle to the floor slope
temp3.TILT = 0;
temp3.ROLL = 0;
temp3.PAN = -MY.PAN;
vec_rotate(normal,temp3);
temp3.TILT = -ASIN(normal.X);
temp3.ROLL = -ASIN(normal.Y);
temp4.TILT = ANG(temp3.TILT-MY.TILT);
temp4.ROLL = ANG(temp3.ROLL-MY.ROLL);
vec_scale(temp4.pan,0.5);
c_rotate(my,temp4.pan,ignore_me);