objectPointAt() and setCamera() don't render when pointing straight up or down
-
The objectPointAt() and setCamera() functions have an issue (as of FUZE 3.1.0) where things don't render if the pointed-at position is straight up or down from the origin position. In the case of objectPointAt(), this happens when argument 2 is only different from the object's position on the Y-axis; the result is that the object disappears. In the case of setCamera(), it happens when arguments 1 and 2 differ only on the Y-axis; the result is that the entire camera view doesn't render.
The following code demonstrates:
var obj1 = placeObject(cube, {0, 5, 0}, {1, 1, 1}) var obj2 = placeObject(cube, {3, 5, 0}, {1, 1, 1}) ink(white) loop setCamera({0, 0, 0}, {0, 1, 0.0001}) objectPointAt(obj1, {0, 4, 0.0001}) updateView("Testing objectPointAt()" + chr(10) + "obj1 not quite pointed straight down" + chr(10) + "Result: obj1 renders") objectPointAt(obj1, {0, 4, 0}) updateView("Testing objectPointAt()" + chr(10) + "obj1 pointed straight down" + chr(10) + "Result: obj1 doesn't render") setCamera({0, 0, 0}, {0, 1, 0.0001}) objectPointAt(obj1, {0, 4, 0.0001}) updateView("Testing setCamera()" + chr(10) + "Camera not quite pointed straight up" + chr(10) + "Result: camera view renders") setCamera({0, 0, 0}, {0, 1, 0}) updateView("Testing setCamera()" + chr(10) + "Camera pointed straight up" + chr(10) + "Result: camera view doesn't render") repeat function updateView(_text) drawObjects() printAt(0, 0, _text) update() sleep(5) clear() return void
The visual result of running the code is this:
-
Thank you for reporting this and for the example program!