Updated ship's speed & float

This commit is contained in:
Rain Clark 2024-05-14 18:03:40 -04:00
parent d9b384b4a0
commit 8319ddf25a

View File

@ -1,14 +1,12 @@
extends CharacterBody2D
# FIXME: Tweak speed and floatyness4
signal crashed
const BULLET = preload("res://scenes/bullet.tscn")
@export var accleration := 90.0
@export var max_speed := 350.0
@export var rotation_speed := 200.0
@export var accleration := 100.0
@export var max_speed := 400.0
@export var rotation_speed := 250.0
var viewport_size : Vector2
@ -35,7 +33,7 @@ func _physics_process(delta: float) -> void:
velocity.limit_length(max_speed)
### Slowly stops movement if no accleration
if accleration_direction.y == 0:
velocity = velocity.move_toward(Vector2.ZERO, 1)
velocity = velocity.move_toward(Vector2.ZERO, 0.5)
## Rotation
rotate(deg_to_rad(rotation_direction * rotation_speed * delta))