Forum

Objects are upside-down when loading dynamically

15 May 2018 21:49
Often (but not always!) when dynamically loading objects into a scene, the objects are upside-down. I'm basically using the same technique as outlined in the Furnishing a Room tutorial. The exact behavior is that on the first load, the objects all load correctly. Nonetheless, when loading a subsequent set of objects into the same scene (after deleting the first set of objects) the subsequent objects are all flipped vertically. Has anyone come across this behavior or have any idea how I can fix it. Thanks in advance.
20 May 2018 20:19
This was a bug in my code related to setting camera limits when loading a set of objects into the scene. I was setting the vertical camera limits in "camera space".
m_camera.target_set_vertical_limits(activeCamera, {down: 0.79, up: -0.79, camera_space: true});

Changing the "camera_space" parameter to false solved the problem.
 
Please register or log in to leave a reply.