adds collision to spawned monsters, moves player position 3 units back

This commit is contained in:
Luca 2024-09-19 20:48:54 +02:00
parent f025f89401
commit e8f06e7b99
12 changed files with 251 additions and 121 deletions

View file

@ -4,13 +4,6 @@ extends CharacterBody3D
const SPEED = 5.0
const JUMP_VELOCITY = 4.5
func _ready() -> void:
pass
func _process(delta: float) -> void:
#$CameraRoot.rotation.y += 0.005
pass
func _physics_process(delta: float) -> void:
animated_mesh.idle()
@ -62,3 +55,12 @@ func _physics_process(delta: float) -> void:
if velocity.length() < 0.01:
animated_mesh.idle()
# what happens when a battle starts?
# the player is positioned (mostly elsewhere than where he currently stands)
# ui changes
# music changes
func start_battle(player_position: Vector3) -> void:
position = Vector3(player_position.x, position.y, player_position.z)
print("düdelüdelüdelüdelü")
print("start battle")