I have a laser in a game I'm making that is the length of the screen, and aims in 360 degrees. It runs smoothly until I try to test for collisions. I tried box collisions, but the collision box doesn't rotate with the laser, and results in incorrect collisions. Any thoughts?
Close enough (it acts similarly), but it needs to shoot stuff. The game runs smoothly until an enemy comes within the bounding box of the laser and construct starts testing per-pixel collisions.
Ok i get it, Here's an example of the laser killer stuff [url:2lm4chiq]http://www.sendspace.com/file/kqs5aj[/url:2lm4chiq]
Laser and Targets have Collision per pixel.
That's what I tried - I miscommunicated, sorry. What I mean is how can I do it without dropping the frame rate? You example seems to run smoothly, but in the game I'm working on, at 800x600 and with a larger laser, doing that causes the framerate to go from 120fps to about 10.
The graphic itself is about 300x100, and it's stretched to the length of the screen. Construct has no problem displaying it at all, it's the collisions that cause the frame rate to be at 10fps, because when there are no enemies on screen it runs smooth as silk.