|
![](/i/fill.gif) |
> I'd fooled myself into believing I'd got it right.
>
> Regards,
> Chris B.
>
Sorry about that, I should have been using VRotationD to pick up the angle
and I'd failed to get the correct sequence of parameters to get the
rotational directions correct. The following should be good to go.
#include "Math.inc"
#local Norm = <1,2,3>;
//#local Norm = <-1,2,-3>;
//#local Norm = <-8,-2,4>;
//#local Norm = vrotate(y,<-46,0,-45>);
#local Z_Rotation = VRotationD(y, Norm*<1,1,0>, z);
#local X_Rotation = VRotationD(y, vrotate(Norm, -Z_Rotation*z), x);
#local Test = vrotate(y*vlength(Norm),<X_Rotation,0,Z_Rotation>);
#debug concat(vstr(3,Test,",",3,3),"\n")
Regards,
Chris B.
Post a reply to this message
|
![](/i/fill.gif) |