Posted By: Ch40zzC0d3r
Adapting angle of Feet - 03/12/14 10:37
Hey guys
Well, Ive got a little math problem and idk what I could do to achieve my goal. Well first of all, heres my code:
Im trying to adapt the feet rotation to the ground. The code works fine if I go up my ramps (only on one side because of the negating), it doesnt work on the other side if I go down the ramp. How can I adapt the rotation better to the ground?
Well, Ive got a little math problem and idk what I could do to achieve my goal. Well first of all, heres my code:
Code:
if(c_trace(my.x, vector(my.x, my.y, my.z - 100), IGNORE_ME | IGNORE_PASSABLE | SCAN_TEXTURE)) { vec_to_angle(footRotation, hit.nx); ent_bonerotate(me, "Bip01_L_Foot", vector(0, -footRotation.tilt + 90, 0)); ent_bonerotate(me, "Bip01_R_Foot", vector(0, -footRotation.tilt + 90, 0)); }
Im trying to adapt the feet rotation to the ground. The code works fine if I go up my ramps (only on one side because of the negating), it doesnt work on the other side if I go down the ramp. How can I adapt the rotation better to the ground?