mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2025-01-25 18:39:18 +01:00
Portals - Show RayCast debug helper
Switches the raycast helper to global portal_mode, allowing it to show when portals are active.
This commit is contained in:
parent
d879fe8b1a
commit
0859d5b60f
@ -414,6 +414,12 @@ void RayCast::_create_debug_shape() {
|
|||||||
Ref<ArrayMesh> mesh = memnew(ArrayMesh);
|
Ref<ArrayMesh> mesh = memnew(ArrayMesh);
|
||||||
|
|
||||||
MeshInstance *mi = memnew(MeshInstance);
|
MeshInstance *mi = memnew(MeshInstance);
|
||||||
|
#ifdef TOOLS_ENABLED
|
||||||
|
// This enables the debug helper to show up in editor runs.
|
||||||
|
// However it should not show up during export, because global mode
|
||||||
|
// can slow the portal system, and this should only be used for debugging.
|
||||||
|
mi->set_portal_mode(CullInstance::PORTAL_MODE_GLOBAL);
|
||||||
|
#endif
|
||||||
mi->set_mesh(mesh);
|
mi->set_mesh(mesh);
|
||||||
add_child(mi);
|
add_child(mi);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user