Hi, I have a vehicle which rezes a smaller object inside it on command, the problem I have is trying to get the offset position to be relative to the direction its faceing, i.e. if its facing east it would be <2,0,-1.9> but west would need to be <-2,0,-1.9>, I know theres math ways to solve it but the only ones I've looked are geared to a moving linked part ( like a turret) and the math seems to work realtive to linked position to root pos.
Were with mine its rezing from the root. any help would be appreciated
heres the code I'm playing with.
rot = <0,0,0,1> * (llGetLocalRot() * llGetRootRotation());
pos = llGetRootPosition() + (llGetLocalPos() * llGetRootRotation()) + (REZ_OFF * rot);
llRezObject( "Wasp", pos, <0,0,0>, llGetRot(), 1);
rot and pos are empty rotation/vector REZ_OFF is a vector which is the offest when the vehicle is rotated to 0,0,0. This code dosn't work at all at the moment which might be beacuse I'm useing the root to rez it from.