Hi,
I’m trying to make ball bouncing effect on a 2D Grid Grap, without unity physics. The ball is shoot along the blue ray(not path finding moving)
so what is the best way to calculate the neccesary intersection information?
or is there specific graph API I should learn to do this?
I really want to hear your advices, thanks
I’d honestly go out on a limb and say this just isn’t a case that Astar was built in mind for. You’ll want to do this manually with something like a raycast.
Hi
You can actually pretty easily get this intersection information using the Linecast methods:
It will givey ou the intersection point, as well as the tangent (which you can easily convert into a normal vector by rotating it 90 degrees).
2 Likes
Thanks, GridGraph.Linecast works very well
Learn somethin’ new everyday here