uheartbeast
replied to your video “Nom Nom Nom Delicious Plasma Beams.”
This is lovely! How did you pull that off?
Oh thanks,
The theory consists of using a Texture Quad with a repeat flag and scroll UV on the X axis to simulate the laser movement.
On Godot Engine the easiest way is:
- Create a 2d Sprite.
- Load repeatable texture on X axis.
- Enable Repeat flag on texture.
- Enable Region flag on Sprite.
- Set the Region Rect to 0,0,Texture Width, Texture Height.
- Scroll the texture content using the X portion of Region Rect, you could use a Animation Player and animate X from 0 to Texture width.
- For collision use Raycast polling on fixed update with the help of intersect_ray() method from Space State.
I could create a more detailed post during the weekend if somebody is interested.