I'm taking my first stab at doing intersect object collision for polygonal pcollision as suggested by many now that I've written a guide to help me understand it. Incase you don't know the process you basically send out an intersection ray to every object in the world and check to see if the distance from that object to you is right infront of you, if so disallow movement.
I assume this would lag up the game looking for every object in the world, so to reduce lag I'm:
- Only sending the rays to objects within a 100 WU radius
- Only sending the rays out when I'm moving
So am I going about this properly? So far I made a quick little program that sends a ray to a box in the world, and checks if the distance recieved by that ray is equal to half of your width, if so reposition you to your last well known coordinates. It works pixel-perfectly so now Im going to attempt at expanding this to every object. Is there a better "tried and true" method for this or is this correct?
<EDIT> Look at my most recent post, I still need help <>
Your signature has been erased by a mod because the filesize was too large.