few months ago i solved a problem i had, i wanted to get a point intersection on a line, by using a radians calculation. could be thats a bit more performance eating, than this procedere from below.
so i figured a different way out.
//maya mel
//dirkscher lineINTERSECTION check
//line
vector $pnt0 = `getAttr pCube1.translate`;
vector $pnt1 = `getAttr pCube2.translate`;
vector $vecLINE = $pnt0 - $pnt1;
vector $vec2WORLD = <<0,1,0>>;
//driver
vector $pnt2 = `getAttr pCube3.translate`;
vector $vecPNT = $pnt0 - $pnt2;
vector $normal1 = cross($vecPNT ,$vec2WORLD);
float $normal1X = $normal1.x;
float $normal1Y = $normal1.y;
float $normal1Z = $normal1.z;
vector $difference = dot($normal1,$vecLINE);
Keine Kommentare:
Kommentar veröffentlichen