Raycasting with shapes?
Posted: Mon Apr 29, 2013 11:41 am
To give some context for this problem: I have a top-down game where the player slashes with his sword in a quarter-ish circle arc. I use the physics system to detect what bodies it hit. Right now, the only way I can think of doing this is is by casting multiple rays distributed over the triangle area I want to check using World:rayCast, storing the results (per callback) in a list, removing duplicates from the list once all the collision events are done, then process the 'hit-by-sword' event for every one of those. It strikes me as overly complicated though.
I'm wondering if there isn't a simpler way to do this. Is it possible to do a sort-of-raycast with a shape or set of shapes?
I'm wondering if there isn't a simpler way to do this. Is it possible to do a sort-of-raycast with a shape or set of shapes?