Attempting to perform a function on every the offbeat of a song

Godot Version

Godot 4.2

Question

I’m relatively new to Godot and working on a mix of a racing game and a rhythm game and I would like to make a function that if the player hits a button on the offbeat of the song it gives the car a boost.

I have the BPM of the song and an easy way to grab the offbeat, however I’m stumped on how to get the game to pulse a function on the offbeat since it ends up firing every tick of the game.

With no code it’s hard to tell. Here’s the documentation page on how to sync audio and gameplay Sync the gameplay with audio and music — Godot Engine (stable) documentation in English and here’s a small demo godot-demo-projects/audio/bpm_sync at master · godotengine/godot-demo-projects · GitHub

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.