Réglage de la vibration du bot lorsqu'il y a peu de FPS #15

Merged
CoCo_Sol merged 1 commit from bot-move into main 2024-01-07 09:26:22 +00:00
Showing only changes of commit ddadf97e0e - Show all commits

View file

@ -558,8 +558,10 @@ def _update_bot(world: World):
# On se déplace vers la meilleure option
diff = target - bot[Position].y
if abs(diff) > 10:
if abs(diff) > bot[Speed] * world[Delta]:
bot[Position].y += (diff / abs(diff)) * bot[Speed] * world[Delta]
else:
bot[Position].y = target
def __check_bonus_collision(world: World):