Hey guys, i need some help with a coding problem and i currently have no code (because i haev no idea how to tackle this problem) Is there a way, where i import a picture, and if an object (a ball, like the ones in the physics engine i posted) hits a certain color, it rebounds ( i know the how to code rebounding code and what not, i just need a detection method) much thanks.
Cheers
__________________ go on, buy the melon you started wanting a second ago...
so far i have a "Ball" class it defines the, i also have a dot object, i need an easy way to see if a ball has hit a dot
and rather than looping through every dot and ball i was trying to use a color collison method, is there another type of object collison that would work well with many balls/dots?
The ball class has a bunch of info like velocity and position, who has control over it (human or computer) while the dot class is just a vector2 position.
__________________ go on, buy the melon you started wanting a second ago...
i just applied an older method i had from a different physics engine,. its works pretty well, but i really wanted color collison so could import a picture of a level and have the game figure out object collison from that, rather then designing a level editor or manual entry.
__________________ go on, buy the melon you started wanting a second ago...
With color collision, you'll still need to make a color map that corresponds to the proper collision detection. and I'm sure a physics engine would include ways to easily add collision to an object.