|
|
Disnel wrote:
>
> I don't think so. It works when I replace isosurface with
> box or sphere (and I think, that px and pz are declared locally
> in macro). And it does not work when I replace them with
> ax or az, as you wrote.
>
> Which version od MegaPOV are you using? I use Linux version.
>
> Fabien Mosen wrote:
> >
> > The problem is due to the fact that you use the same variable
> > names in the macro and in the loop. This works :
> >
> > #macro PlaceTree(ax, az)
> > #local Normal=<0, 0, 0>;
> > #local Where = trace(Landscape, <ax, 10, az>, <0, -1, 0>, Normal);
> > #if (Normal.x = 0 & Normal.y = 0 & Normal.z = 0)
> > #warning "Tree not placed\n"
> > #else
> > object {Tree translate Where}
> > #end
> > #end
Another problem is that "Normal" is a reserved word. When I changed it
to something else (such as "Norm"), it worked.
Post a reply to this message
|
|