hey all,
I am trying to write an InspectObject script, bound to the MainCamera, that will allow panning, zooming, rotating of a given object in focus.
However, I would like to the script to update even when I’m not in the game window (e.g. when I move the camera manually via the scene window, then click back into the game window, my camera values “jump” to their original values before any manual adjustment was made).
I have yet to grasp the pipeline fully, but was wondering if anyone here has experience with this kind of effect or could point me in the right direction.
Attached is the sample code with the undesired behavior.
Thanks
123281–4620–$object_navigation_basic_195.js (2.62 KB)
I think this is happening because the game loop pauses in the dev environment if the game window is not active?..ahh.
I don’t understand what is causing the camera to jump around. I have the transform of the target bound to the object I want to inspect…
Ideally I would like to have a reference to one of these targets, initialized at the center of volume of a given object, to be swapped for this proposed ObjectInspect script to refocus on new objects…
I am experiencing some very weird jumping around of the camera while using the move_target() and zoom_in_out() functions (in the attached Object_Navigation_Basic.js file)
Is the math way off or is there still something about the pipeline I’m failing to comprehend? Any pointers are appreciated, I am lost!