How to create Shoot Object Path Tracing with Unity?

I want to create a similar effect for the Block Breaker game that we have in the course. Have a look at the demo from a live game.

TouchPathTrace

Any idea on how to create one?

My Take on it
Maybe RayCasting and Reflected light from side boundaries and then we can use Something like Debug.DrawRay ?

Some working code samples or tutorials would be greatly appreciated.

Hi AnimeshShaw,

Maybe this tutorial helps. The formula is a bit more complex as the code is supposed to draw a parabola but you could try to use The Game Guy’s technique and modify it.

Also please feel free to ask our helpful community of students for advice in our official Discord chat.


See also:

1 Like

Hi @Nina,

Thanks for the video. I will go through the article and let you know and once solved I will mark it as Solved with final code.

BTW this is what I got when I tried a few things:

That looks like a good start. If you work with raycast, check for collisions. At the hit point, you simply reflect the ray.

1 Like

@Nina

I went ahead with the trajectory formula as well but in this case the gravity is to be eliminated and spawning needs to be corrected. I am going through the links you have provided and I will try to come up with a solution.

@Nina I wanted to inform that I have had made some progress but it’s not perfect yet. Once that’s done I will mark the solution and post my take on it as well.

How are you getting on with this, @AnimeshShaw?

This topic was automatically closed after 22 hours. New replies are no longer allowed.

Privacy & Terms