8 lines
340 B
GDScript
8 lines
340 B
GDScript
@tool
|
|
extends Node
|
|
|
|
func draw_raycast_hit(params: PhysicsRayQueryParameters3D, result: Dictionary, duration: float = 0.0) -> void:
|
|
var is_hit: bool = result.has("collider")
|
|
var hit_loc: Vector3 = result.get("position", params.to)
|
|
DebugDraw3D.draw_line_hit(params.from, params.to, hit_loc, is_hit, 0.25, Color.RED, Color.BLACK, duration)
|