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\$
4
  • \$\begingroup\$ Does Godot have an equivalent to the Unity LineRenderer? \$\endgroup\$
    – Philipp
    Commented Aug 28, 2018 at 10:18
  • \$\begingroup\$ @Philipp, yes it does. And if the methods are slightly different, I can always write my own. \$\endgroup\$
    – DyingIsFun
    Commented Aug 28, 2018 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\$ Commented Aug 30, 2018 at 20:23
  • 1
    \$\begingroup\$ @648trindade with a tiny bit more detail, that's an answer I'd upvote. :) \$\endgroup\$
    – DMGregory
    Commented Aug 31, 2018 at 0:01

2 Answers 2

1
\$\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\$
0
\$\begingroup\$

One technique is the following.

enter image description here

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .