Hi guys. Did a forum search but didn't quite find what I needed.
I need a lazer beam at any angle between two points, preferrably using an unstrected image because I'd like it to animate. Let's assume the image is an animation in dimensions 13 x 5.
This means the ideal would be if it could tile.
I also need help with the maths to center the image correctly along the line, and to ensure the image is cut at either point, i.e. stops tiling when the desired length is reached.
Assumedly collision can be checked via the normal imagescollide functionality?
Any sample code would be greatly appreciated.
---
Additionally, what would be the best way to implement a similar lazer using a stretched image, also centered?
I need a lazer beam at any angle between two points, preferrably using an unstrected image because I'd like it to animate. Let's assume the image is an animation in dimensions 13 x 5.
This means the ideal would be if it could tile.
I also need help with the maths to center the image correctly along the line, and to ensure the image is cut at either point, i.e. stops tiling when the desired length is reached.
Assumedly collision can be checked via the normal imagescollide functionality?
Any sample code would be greatly appreciated.
---
Additionally, what would be the best way to implement a similar lazer using a stretched image, also centered?