This commit is contained in:
leo 2022-02-10 23:22:17 +01:00
parent c7cd36917a
commit a1b063047a
Signed by: leo
GPG Key ID: 0DD993BFB2B307DB

4
Car.py
View File

@ -46,7 +46,7 @@ class Car:
self.pos=list(self.laneShape[0])
self.v=0
self.a=0
self.a=10
self.b=20
self.surf=surface
@ -67,7 +67,7 @@ class Car:
S=5
T=0.3
vsec=vleader+(S-vmax*T)/(vbar/bbar+T)
vd=min(self.v*self.a*dt,vmax,vsec)
vd=min(self.v+self.a*dt,vmax,vsec)
self.v=max(0,vd)
def update(self,dt):