Auto-Adjust Axis
Hey guys, I've been working on learning Tribes2's rotation and vector system. I'm making an auto-adjust for all the axis. Say you have a building with diagonal beams, but you want to auto-adjust a beam going straight down. Normally, we'd have to make a certain size, rotate it, and then auto-adjust/merge. Basically, my addition adds the "auto adjust down" option to the LSB pack sizes. It first rotates the spine to face down (while keeping intact any other rotations), then autoscales it.
I'm having trouble getting it to face down, though. I've tried many different things, all with different outcomes. None of which were what I intended. Here's a portion of the code that I'm having trouble with:
PackSet 6 is referring to the 'auto adjust down' pack setting. I've explored many of the functions here to find out what they do, but vectors still don't make much sense to me. Could any of the scripters here help?
Thanks,
~Syn~
I'm having trouble getting it to face down, though. I've tried many different things, all with different outcomes. None of which were what I intended. Here's a portion of the code that I'm having trouble with:
%rot = fullRot(%item.surfaceNrm,%item.surfaceNrm2); if(%plyr.packSet == 6) // TODO - Fix this rotation to face down. %rot = "0 " SPC getWord(%rot,2) SPC getWord(%rot,3) SPC getWord(%rot,4); if (%plyr.packSet == 6) { // Auto-adjusting down %space = rayDist(%item.surfacePt SPC %item.surfaceNrm,%scale,$AllObjMask); if (%space != getWord(%scale,1)) %type = true; %scale = getWord(%scale,0) SPC getWord(%scale,0) SPC %space; }
PackSet 6 is referring to the 'auto adjust down' pack setting. I've explored many of the functions here to find out what they do, but vectors still don't make much sense to me. Could any of the scripters here help?
Thanks,
~Syn~
Comments
Look at the Walkway deploy code, those automatically deploy with proper rotation.
You could apply at code block, and have it find a proper rot at the targets location, then apply it.
Floor*
Noob.
Or, atleast, why doesn't it set the X orientation to zero?
~Syn~
Yep. Eolk is our son. Me and Alviss made him out of broken glass, metal scraps, and rotten egg yolk.
And we are fighting over his custody.
Noone Acutally reads the credits so put both your names in em so youll be happy
He's mine goddamn it!
nah, we always bicker like this. You should see the hidden ACCM forum section. rofl.
~Syn~