Closed Zaphodious closed 5 months ago
The camera seems to work fine in game even if the error is happening. A specific error message (and a specifier in the docs that the Host should be the first child) would make this easier to work around, but if possible I think that being able to have the Host as a child of the Camera3D in any position would allow for the most flexibility.
I'm also getting this error but my main camera doesn't even have any other children other than the host
Submitted a PR(#189), have a look and see if that works.
Tested, and the viewfinder functions correctly when PhantomCameraHost is not the first child! Thanks!
Wait, I'm now getting an error when I launch my game: res://addons/phantom_camera/scripts/panel/viewfinder/viewfinder.gd:370 - Invalid get index 'Constants' (on base: 'Nil').
Wait, I'm now getting an error when I launch my game: res://addons/phantom_camera/scripts/panel/viewfinder/viewfinder.gd:370 - Invalid get index 'Constants' (on base: 'Nil').
Can't seem to replicate it when running test scenes? Are you sure it's related to the issue in this ticket?
Have merged in #189 to get the initial fix in.
Wait, I'm now getting an error when I launch my game: res://addons/phantom_camera/scripts/panel/viewfinder/viewfinder.gd:370 - Invalid get index 'Constants' (on base: 'Nil').
If you're still encountering this problem, please do open another issue and we can have a look at that there.
Issue description
If the PhantomCameraHost on a Camera3D is not the first child, the editor preview breaks and an error message is spammed to "Output".
Example error: res://addons/phantom_camera/scripts/panel/viewfinder/viewfinder.gd:351 - Invalid call. Nonexistent function 'get_active_pcam' in base 'MeshInstance3D'
Steps to reproduce
1) Have a camera in a scene with a PhantomCameraHost attached, but with some other type of node as the first child 2) Open the scene in the Godot editor 3) Observe the non-functional "Phantom Camera" preview and the error messages in "Output"
(Optional) Minimal reproduction project
phantomcamera-preview-mrp.zip