aboutsummaryrefslogtreecommitdiffstats
path: root/Scripts/car_behaviour.gd
diff options
context:
space:
mode:
authorLibravatar perivesta <>2023-07-08 16:45:32 +0200
committerLibravatar perivesta <>2023-07-08 16:45:32 +0200
commit8b08fec313ac3517e782d946cbd203958801e6be (patch)
treecab276d81c92fd0ff8d75694c4c252812b4b827c /Scripts/car_behaviour.gd
parentd98cee8592e15f23ce85e8d54abb29aa341c97da (diff)
parent78b6db9f792e18d848383856693cff4ef223a10f (diff)
download2023-8b08fec313ac3517e782d946cbd203958801e6be.tar.gz
2023-8b08fec313ac3517e782d946cbd203958801e6be.tar.bz2
2023-8b08fec313ac3517e782d946cbd203958801e6be.zip
Merge branch 'game-control'
Diffstat (limited to 'Scripts/car_behaviour.gd')
-rw-r--r--Scripts/car_behaviour.gd4
1 files changed, 1 insertions, 3 deletions
diff --git a/Scripts/car_behaviour.gd b/Scripts/car_behaviour.gd
index 03546d3..2ef9fb9 100644
--- a/Scripts/car_behaviour.gd
+++ b/Scripts/car_behaviour.gd
@@ -1,4 +1,4 @@
-extends StaticBody2D
+extends CharacterBody2D
# editor variables
@export var max_speed = 300
@@ -14,7 +14,6 @@ var interest = []
var danger = []
var chosen_dir = Vector2.ZERO
-var velocity = Vector2.ZERO
var current_speed = 0
@@ -26,7 +25,6 @@ func _ready():
for i in num_rays:
var angle = i * 2 * PI / num_rays
ray_directions[i] = Vector2.RIGHT.rotated(angle)
- print(ray_directions)
func _physics_process(delta):
if not driving: