Thank you!! Well a lot of trial and error hahahaa I searched it a lot until I found a page with the theory behind it. Once I got the hang of it I managed to implement it using godot. It was not so easy tho