add plasma beam

Hello

datysoos!

For your first question:

Hey, hello. It is me again. I was interesting your laser in godot QA, then I was in your blog. So i have a question: how to make laser go to the mouse cursor?

Now in the Plasma Beam from the tutorial We have:

So We could get the distance and angle from two vectors and fill the plasma beam “beam_size_x”/rotation with that data.

For your second question:

And I forgot that idk how to enable raycast collision. Sorry if asking too much

For raycast look at How To make it using Space State Queries:
http://docs.godotengine.org/en/latest/tutorials/ray-casting.html

Basically you cast a ray with “space_state.intersect_ray” method and use the collision position from result to adjust the plasma beam “beam_size_x”, also you could get the collided node too from result.

Someday I could write the Plasma Beam tutorial part 2 with this more detailed.

Leave a Reply