How is everyone correctly handling Collisions.
I might be thinking wrong here.. But the steps I am taking are the following.. When I am drawing an Object I also write it to a collision Layer.
When I am updating an Object I am checking it against Each collision layer. Then Process the Array of Objects returned. Then I reset the Collisions and start over.
Is this the correct and most efficient way to handle this?
It seems to be bogging down when I get 30 or more objects. Is this normal? Or is the slowdown most likely somewhere else in my code.
I have been toying around with checking the distance to an object but then the collisions don't look accurate.
What is everyone else doing?
Regards,
Eric
I might be thinking wrong here.. But the steps I am taking are the following.. When I am drawing an Object I also write it to a collision Layer.
When I am updating an Object I am checking it against Each collision layer. Then Process the Array of Objects returned. Then I reset the Collisions and start over.
Is this the correct and most efficient way to handle this?
It seems to be bogging down when I get 30 or more objects. Is this normal? Or is the slowdown most likely somewhere else in my code.
I have been toying around with checking the distance to an object but then the collisions don't look accurate.
What is everyone else doing?
Regards,
Eric