The impulses aren't exactly the global cardinal directions, they are the cardinal directions in respect to the rocket. So if the rocket is heading 45 degrees east of north, and you press the impulse for left trajectory, it will go 45 degrees west of north. I still don't like it though.
My idea for the better rocket swing reads the difference in the player's aim motion. Basically it will involve tracelining directly in front of the player everytime the .think function cycles. By stacking up a self.cnt count on the rocket, I can set an if statement such as:
if (self.cnt*0.5 != rint(self.cnt*0.5)
trace_endpos = self.owner.viewtrace; // new field for storing the player's aim point directly in front of him
Basically that will write the trace_endpos to the player's field only if the .think function updates the rocket's self.cnt to an odd number. This means it will skip it every other cycle. I can then compare the self.viewtrace position to the actual position and if it is a substantial difference, then we know the player means to swing the rocket in that direction and not simply guide it.
I have no idea how it will work just yet, I need to try it out. But it would allow you to swing in any direction just about, and without having to press a button.
Absolutely, I'm all ears man.
My idea for the better rocket swing reads the difference in the player's aim motion. Basically it will involve tracelining directly in front of the player everytime the .think function cycles. By stacking up a self.cnt count on the rocket, I can set an if statement such as:
if (self.cnt*0.5 != rint(self.cnt*0.5)
trace_endpos = self.owner.viewtrace; // new field for storing the player's aim point directly in front of him
Basically that will write the trace_endpos to the player's field only if the .think function updates the rocket's self.cnt to an odd number. This means it will skip it every other cycle. I can then compare the self.viewtrace position to the actual position and if it is a substantial difference, then we know the player means to swing the rocket in that direction and not simply guide it.
I have no idea how it will work just yet, I need to try it out. But it would allow you to swing in any direction just about, and without having to press a button.
P.s. I'm glad you got some use out of trying this idea and helping me out as well. I had another rocket idea that I think is possible that I don't actually intend to use myself though. But with rift quake, from what I can tell so far, may be of interest to you. At least as another fun programming challenge if you're interested.
Comment