3
\$\begingroup\$

I want to implement a wavy laser beam similar to the Proton Backpack in Enter the Gungeon.

https://youtu.be/wl-o6gbMqFM?t=58

It's easy enough to draw a line from one point to another, but how to get the undulating curviness and the lighting effects?

I am working in Godot, but I could easily adapt techniques from Unity, if you know them, since Godot has similar resources.

I asked a version of this question in a Godot forum, but am also asking it here

\$\endgroup\$
  • \$\begingroup\$ Does Godot have an equivalent to the Unity LineRenderer? \$\endgroup\$ – Philipp Aug 28 '18 at 10:18
  • \$\begingroup\$ @Philipp, yes it does. And if the methods are slightly different, I can always write my own. \$\endgroup\$ – GoldenGremlin Aug 28 '18 at 20:03
  • \$\begingroup\$ This Proton Backpack is a stream, like the youtuber said. Think about several gunshots, with a line drawed between them, its almost the same thing. The curviness can be achieved with some 2d-curve algorithm like bezier curve, and take care with cuve continuity \$\endgroup\$ – 648trindade Aug 30 '18 at 20:23
  • \$\begingroup\$ @648trindade with a tiny bit more detail, that's an answer I'd upvote. :) \$\endgroup\$ – DMGregory Aug 31 '18 at 0:01
0
\$\begingroup\$

Probably not the best method, but you could emit particles like a regular gun and draw a curved line between them, give them a certain lifespan and then apply shaders to the lines.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.