--- ray/src/rt/o_instance.c 1989/02/02 10:41:32 1.1 +++ ray/src/rt/o_instance.c 1989/04/20 08:25:22 1.4 @@ -41,13 +41,17 @@ register RAY *r; return(0); /* missed */ if (rcont.rot * in->f.sca >= r->rot) return(0); /* not close enough */ - /* if we have modifier, use it */ - if (o->omod != OVOID) + + if (o->omod != OVOID) { /* if we have modifier, use it */ r->ro = o; - else { /* else use theirs */ + r->rofs = 1.0; setident4(r->rofx); + r->robs = 1.0; setident4(r->robx); + } else { /* else use theirs */ r->ro = rcont.ro; - multmat4(r->rox, in->b.xfm, rcont.rox); - r->ros = in->b.sca * rcont.ros; + multmat4(r->rofx, rcont.rofx, in->f.xfm); + r->rofs = rcont.rofs * in->f.sca; + multmat4(r->robx, in->b.xfm, rcont.robx); + r->robs = in->b.sca * rcont.robs; } /* transform it back */ r->rot = rcont.rot * in->f.sca;