tmp added big nav region
parent
13ef93cedd
commit
d379c20b2b
|
@ -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:
|
||||
|
|
|
@ -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
Loading…
Reference in New Issue