Hello
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:
- A variable for the plasma_beam width (”beam_size_x”).
- The plasma_beam node position.
- The Mouse Position: Documentation about this topic here.
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.