Throw Prediction mechanic

Hi!
In Angry Birds, there is an indicative sight in the form of dots, which stretches when the slingshot is stretched. He shows where the bird is flying. How to do the same in Unity to show the direction of the hook throw. Is my character standing in 2D with an overhead view of a raft and throwing a hook? The mechanics of stretching the hook are done, but it is not clear how to make a throw prediction in the form of a dotted line texture?
Is there a way to do this through the sprite settings and its stretching or smth else?

We had this topic just recently. Here you go, it’s a good read, and ends up with a neat solution (by Kurt Dekker), if you intend to use built-in physics.

Edit:
The dotted texture in itself is a different topic. Maybe you can do it with a line renderer. I remember several threads on this subject. Some people noticed warping near the points, this is because of how quads lined up for them because they wanted the “dots” to be animated. There are several strategies of how exactly to build the mesh while keeping the UV coordinates straight. Depends on what you want to do. If you want just static dots, then you can build a rotated quad at each point, that’s what I would do, at the expense of some overdraw. You can also recycle these quads, instead of building new ones each frame. We can talk about this in more detail.

3 Likes