Pfeile, Spline, platt

Hi nochmal!

...oder auch per Coffee ... ich hoffe, ich habe nix vermasselt ;)

Code:
//    by www.tutorials.de/forum/cinema-4d/
main (doc, obj) {
    var dist    = 500;
    var tobj    = doc->FindObject("target");

    if (!tobj)
        return false;

    var pos     = obj->GetPosition();
    var tpos    = tobj->GetPosition();

    var tvec    = tpos - pos;
    if (vlen(tvec) <= dist)
        obj->SetRotation(VectorToHPB(tvec));
}

Grüße,
Mark.
 
Zurück