trying to float an orb...

Posted By: seneca

trying to float an orb... - 04/23/14 01:43

Hi all, sorry to bother, but I'm trying to have a patrol bot float or hover in one place up and down slowly. I know I wrote a code for it about 5 years ago, modified it from a aum lesson, I think. but I can't find the aum or figure out how I did it. searched for it here on the forum too, but still no answers.

Can someone help me? thanks a bunch!
Posted By: Superku

Re: trying to float an orb... - 04/23/14 06:20

Code:
#define target_height skill80
...
my.target_height = XYZ; // either some value or for example c_trace and then target.z (when trace_hit != 0) + let's say 128
my.skill81 += 8*time_step; // may be a little too fast
my.skill81 %= 360;
my.skill82 = my.target_height+32*sinv(my.skill81)*time_step; // cover a vertical distance of 2*32 = 64 quants
c_move(me,nullvector,vector(0,0,my.skill82-my.z),IGNORE_PASSABLE);

Posted By: seneca

Re: trying to float an orb... - 04/23/14 22:20

It's not what I remember, but it works great!

thank you very much!
© 2024 lite-C Forums