|
|
Am 27.02.2018 um 03:15 schrieb Bald Eagle:
> Mike Horvath <mik### [at] gmailcom> wrote:
>
>> I get an error when I try to set the value of a vector's x-coordinate.
>>
>> #local NearCorner.x = BBoxMin.x;
>>
>> What is the correct way to set this coordinate?
>
> #local NearCorner = <BBoxMin.x, BBoxMin.y, BBoxMin.z>;
>
> or
>
> #local NearCorner = NearCorner + <BBoxMin.x, 0, 0>;
Neither will do what Mike presumably expects to happen; the former would
set all coordinates of NearCorner to those from BBoxMin, while the
latter would /increase/ NearCorner.x by BBoxMin.x rather than replace
the value.
To really just replace NearCorner's x coordinate, use:
#local NearCorner = <BBoxMin.x, NearCorner.y, NearCorner.z>;
or:
#local NearCorner = NearCorner*<0,1,1> + BBoxMin*<1,0,0>;
Post a reply to this message
|
|