You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When switching scenes the Phantom Camera view finder dock tries to make the new scene's PCam3D active, but uses the old scene's Camera3D (via the old scene's PCamHost) if the new scene does not have a PCamHost. This means calling get_global_transform on Camera3D when it is not in the current scene tree which results in the following editor error:
scene/3d/node_3d.cpp:346 - Condition "!is_inside_tree()" is true. Returning: Transform3D()
I was able to remove the error by checking if the camera3d is inside the tree before considering it in addons/phantom_camera/scripts/phantom_camera_host/phantom_camera_host.gd#128
This looks like a case where logic in the _exit_tree() function is called, which tries to communicate with PCamHost. Which it really shouldn't, given everything is exiting the tree when changing scene.
Think there's a more systemic checker that could be put in place to guard against this.
Issue description
When switching scenes the Phantom Camera view finder dock tries to make the new scene's PCam3D active, but uses the old scene's Camera3D (via the old scene's PCamHost) if the new scene does not have a PCamHost. This means calling
get_global_transform
onCamera3D
when it is not in the current scene tree which results in the following editor error:I was able to remove the error by checking if the camera3d is inside the tree before considering it in
addons/phantom_camera/scripts/phantom_camera_host/phantom_camera_host.gd#128
but the real fix should patch the viewfinder logic to clean up on scene switching so it doesnt even try to update the old PCamHost.
Steps to reproduce
Two scenes:
Switching from (1) to (2) should print the erorr.
(Optional) Minimal reproduction project
No response
The text was updated successfully, but these errors were encountered: