Trying new stuff with the camera and grid. I want to be able to move a unit but there is a problem with the grid at the moment. I am now trying to implement a new way of handling the camera, maybe then I can move on to moving units...

This commit is contained in:
gdz
2025-12-15 02:20:03 +01:00
parent 4f9d5fc8bd
commit 67b6198412
17 changed files with 588 additions and 51 deletions

View File

@@ -15,12 +15,14 @@ var _MovingMarker: Node2D = _MovingMarkerScene.instantiate()
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
add_child(_MovingMarker)
_MovingMarker.hide()
_createUnit(Vector2i(10,10))
for unit in _Units:
add_child(unit)
# add_child(_MovingMarker)
# _MovingMarker.hide()
#
# _createUnit(Vector2i(10,10))
# for unit in _Units:
# add_child(unit)
$CameraController.position = get_viewport().get_camera_2d().get_screen_center_position()
pass