tmp added big nav region

main
Yan Wittmann 2024-11-05 13:17:36 +01:00
parent 13ef93cedd
commit d379c20b2b
4 changed files with 2018 additions and 35 deletions

View File

@ -1,7 +1,7 @@
extends CharacterBody2D
const MAX_SPEED: float = 300.0
const ACCELERATION: int = 30
const ACCELERATION: int = 2400
@export var nav: NavigationAgent2D
@ -14,7 +14,7 @@ func _physics_process(delta: float) -> void:
if movement.length() < 20:
movement = -velocity * 0.2
else:
movement = movement.normalized() * ACCELERATION
movement = movement.normalized() * ACCELERATION * delta
velocity += movement
if velocity.length() > MAX_SPEED:

View File

@ -0,0 +1,5 @@
extends Node2D
func _ready() -> void:
pass

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long