Make a Laser Beam in Godot in 1 Minute

preview_player
Показать описание


Рекомендации по теме
Комментарии
Автор

a slower godot 4 version of this would be incredible

jimmytrouble
Автор

Learned so much in a minute! Didn't even know about the World Environment node and the effects you can create with it. Time to go try it out!

DevDuck
Автор

I wanted to try that since I saw Ian Hubert (Blender Lazy Tutorials, the artist who came up with this super snappy tutorial format) perform live at the Blender Conference in 2019.
Feedback and suggestions for improvements, as always, are most welcome!

Gdquest
Автор

Video is 1:50 long. Unsubbed.

Just kidding XD Super cool effect in a super short amount of time. Well done.

uheartbeast
Автор

"I've been GDQuest, you've been you, bye bye."

JSWausZ
Автор

LOL, this literally took me 2.5 hours to do, but here is the equivalent in GODOT 4:

---

extends RayCast2D

@onready var casting_particles: GPUParticles2D = $CastingParticles
@onready var collision_particles_2: GPUParticles2D = $CollisionParticles2
@onready var beam_particle_2d: GPUParticles2D = $BeamParticle2D

var is_casting: bool = false :
set(value):
is_casting = value

beam_particle_2d.emitting = is_casting
casting_particles.emitting = is_casting

if is_casting:
appear()
else:
= false
disapear()


func _ready():
is_casting = false

func _unhandled_input(event: InputEvent) -> void:
if event is InputEventMouseButton:
self.is_casting = event.pressed

func _physics_process(delta: float) -> void:
var cast_point := target_position
force_raycast_update()

= is_colliding()

if is_colliding():
cast_point =
=
= cast_point

$Line2D.points[1] = cast_point
beam_particle_2d.position = cast_point * 0.5
= cast_point.length() * 0.5



func appear() -> void:
var tween = create_tween()
tween.tween_property($Line2D, "width", 3.0, 0.2)


func disapear() -> void:
var tween = create_tween()
tween.tween_property($Line2D, "width", 0, 0.1)

yonatankravitz
Автор

Definitely looking forward to more tutorials in this format! Awesome job!

paulsullivan
Автор

All very helpful and presented in a compact format that's easy to understand. This was excellent. Thank you!

jonpwoodward
Автор

love the straight to the point tutorial, quick and easy to digest!

aphiwadchhoeun
Автор

Wow! I need to deep into the code and review the video but I'm sure I will be learning so much! I love the two particle effects combined. Congrats!!! 👏

Raformatico
Автор

QUE LINDO!!! Seriously, thanks for teaching how to create these beautiful effects!

andrechism
Автор

Really like this kind of teaching techniques. Would love to see more :)

laurenzfoglia
Автор

10/10 good tutorial for neat effects, I'll like to see this as a series

bevvy.bee
Автор

Love the format, though a one second lead-in of silence, or the word "ok" and small pause, would help because I totally had to rewind to catch that first word again.

SamuelSarette
Автор

Short and straight to the point. Perfect!

LegendaryHippo
Автор

Amazing, I've struggled so hard to make a working laser in godot. Thanks for this video!!!

TheBaffler
Автор

Definitely will use, this is great, and It looks so cool

aaronspeedy
Автор

Videos like these are super useful. Please make more.

ansimuz
Автор

Effective, quick, and good looking. Great tutorial, didn't feel like any time was wasted.

felineentity
Автор

I confess I had video speed set to 2 when I first watched it, was like

viniguerrero