What does this mean for me? You will always be able to play your favorite games on Kongregate. However, certain site features may suddenly stop working and leave you with a severely degraded experience.
What should I do? We strongly urge all our users to upgrade to modern browsers for a better experience and improved security.
We suggest you install the latest version of one of these browsers:
Kongregate is a community-driven browser games portal with an open platform for all web games.
Get your games in front of thousands of users while monetizing through ads and virtual goods.
Learn more »
I’m making a top down shooter and I’m about to get started on firing guns. Ideally I want to just draw a line from the gun to the wall it hits, rather than making an actual object for the bullet.
But I have no idea how to check to see which wall the bullet will hit based on the rotation of the gun. :(
How do you do it?
I was going to give you pseudocode for what I use, but I’ll just link the article I used to create mine: [http://dev.mothteeth.com/2011/11/2d-ray-casting-on-a-grid-in-as3/](http://dev.mothteeth.com/2011/11/2d-ray-casting-on-a-grid-in-as3/)
Also, might as well. Screenie of it in action in my prototype:
In addition, remember that if you have any objects not part of your grid that you want to collide with, you’ll need to do a second pass to deal with those. Picture shows grid collision and object collision (circle to line collision).