API ReferenceGE Extensionseditor
Raycast Test Editor Tool
Debug editor tool for testing game engine and physics raycasts with visual feedback.
Debug editor tool for testing game engine and physics raycasts with visual feedback.
Overview
Provides a checkTerrainCastRay edit mode with two raycast methods: standard game-engine raycast and physics-based grid raycast. Results displayed as colored debug spheres.
Public API
| Function | Signature | Description |
|---|---|---|
M.onEditorInitialized | M.onEditorInitialized() | Registers edit mode, window, and Debug menu item. |
M.onEditorGui | M.onEditorGui() | Renders tool window with raycast mode combo selector. |
M.onExtensionLoaded | M.onExtensionLoaded() | No-op. |
M.onEditorRegisterPreferences | M.onEditorRegisterPreferences(prefsRegistry) | Registers raycastTest.general.rayCastMode preference. |
M.onEditorToolWindowHide | M.onEditorToolWindowHide(wndName) | Switches to object select mode when window closes. |
Raycast Modes
| Mode | Description |
|---|---|
Gameengine Raycast | Uses Engine.castRay() with forest collision disabled; draws hit point + normal |
Physics Raycast | Casts a 5×5 grid of physics rays via castRayStatic(); colors hits by distance |
Usage
Accessible via Window → Debug → Raycast Test in the editor.
-- Switches to raycast test edit mode
editor.selectEditMode(editor.editModes.checkTerrainCastRay)See Also
- Editor AI Tests - Related reference
- Editor AI Visualization - Related reference
- Editor – Assembly Spline Tool - Related reference
- World Editor Guide - Guide