[Solved] A spaceship shooting a column of fire (not traspassing solid tiles)

Hi all!
Im developing a small space shooter with single screens and i plan to create 3 types of bullets. I have finished 2 of them but i dont know how to do the third one.
It should be a column of laser (fire) but stopping in the solid tiles, but if you have the fire button pressed and move right or left from this tile, the laser column continues expanding (from the spaceship) up until the next solid tile.
I attach an screenshot of what im talking about. I dont know how to do it and i cant even imagine how to do it :))

The spaceship moves around the limits of the screen.
Thank you in advance!

Hi, I am not sure if I completely understood you: you have a spaceship that fires two lasers and both lasers should not go beyond the solid tiles?

You can do that with a raycast for each of your lasers. In the ‘zombie laser’-example you can find how to do that Zombie laser - a game example from the GDevelop game making app | GDevelop

Thank you. I did it using raycast.
Thank you!


1 Like