update root unit node to CharacterBody3D and fix selection logic

This commit is contained in:
2024-10-06 01:37:16 +10:00
parent 326877f384
commit a6fb508151
4 changed files with 8 additions and 4 deletions

View File

@@ -97,7 +97,7 @@ func _on_frustrum_area_unit_entered(unit: Node3D) -> void:
if visible_units.keys().has(unit_id):
return
visible_units[unit_id] = unit.get_parent()
visible_units[unit_id] = unit
func _on_frustrum_area_unit_exited(unit: Node3D) -> void:

View File

@@ -1,4 +1,4 @@
extends Node3D
extends CharacterBody3D
class_name TestUnit
var selected: bool = false