diff --git a/scripts/chunk_scene.gd b/scripts/chunk_scene.gd index f19cf9b..ce231a4 100644 --- a/scripts/chunk_scene.gd +++ b/scripts/chunk_scene.gd @@ -11,9 +11,9 @@ extends Node3D ## ## ``` ## ChunkScene (Node3D) -## ├── TileLayer (Node3D) # one per tile layer (ground, walls, decor, ...) -## ├── StaticObject (Node3D) # props, geometry, interactables -## └── DynamicObject (Node3D) # spawnable entities (templates) +## ├─ TileLayer (Node3D) # one per tile layer (ground, walls, decor, ...) +## ├─ StaticObject (Node3D) # props, geometry, interactables +## └─ DynamicObject (Node3D) # spawnable entities (templates) ## ``` ## ## ## Lifecycle @@ -92,7 +92,7 @@ func _add_static_object(obj: WorldObject) -> void: var static_obj := StaticObjectNode.new() static_obj.world_object = obj static_obj.position = obj.position - static_obj.rotation = obj.rotation + static_obj.quaternion = Quaternion(obj.rotation.x, obj.rotation.y, obj.rotation.z, obj.rotation.w) static_obj.scale = obj.scale static_obj.name = "static_%s" % obj.id add_child(static_obj) @@ -102,7 +102,7 @@ func _add_dynamic_object(obj: WorldObject) -> void: var dynamic_obj := DynamicObjectNode.new() dynamic_obj.world_object = obj dynamic_obj.position = obj.position - dynamic_obj.rotation = obj.rotation + dynamic_obj.quaternion = Quaternion(obj.rotation.x, obj.rotation.y, obj.rotation.z, obj.rotation.w) dynamic_obj.scale = obj.scale dynamic_obj.name = "dynamic_%s" % obj.id add_child(dynamic_obj)