Hey, I used my own implemention of the $1 algorithm, described here:
https://depts.washington.edu/acelab/proj/dollar/index.html
You can find the relevant source code here:
https://github.com/guladam/BigBlackBookOfMagic/tree/main/spellcasting
But I know multiple existing plugins have the implementation of these algorithm as well:
https://github.com/angrychill/q-dollar-gesture-godot
Hope that helps!