Navigation

    Fuze Arena Logo
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    • Help
    • Discord

    objectPointAt() and setCamera() don't render when pointing straight up or down

    Bug Reporting (FUZE 4 Nintendo Switch)
    2
    2
    228
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • mozipha
      mozipha last edited by

      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:
      2023062313045500_s.jpg
      2023062313050000_s.jpg
      2023062313050500_s.jpg
      2023062313051100_s.jpg

      1 Reply Last reply Reply Quote 1
      • Kat
        Kat Fuze Team last edited by

        Thank you for reporting this and for the example program!

        1 Reply Last reply Reply Quote 0
        • First post
          Last post