Unity is great, but until then...collision?

Apprentice
Posts: 10
Joined: 2009.04
Post: #1
Hello.

So, I've been testing the Unity demo and it's simply incredible, yes I'll be buying as soon as I've made at least some money from a game made entirely in Xcode. But until then I need to prove to myself this isn't fad, so Xcode it is. Now, my problem.

Collision detection based upon colour in a non-visible background graphic, is that possible? What I mean by that is, say you have a little car you want to roll along a curvy ground plane, by using PNG images as the source of the detection, black is hard, white is soft etc. I've done the usual searches but come up more confused than when I started. Does anyone have any pointers?

Regards.

E.
Quote this message in a reply
Member
Posts: 51
Joined: 2009.02
Post: #2
emptythetill Wrote:Collision detection based upon colour in a non-visible background graphic, is that possible? What I mean by that is, say you have a little car you want to roll along a curvy ground plane, by using PNG images as the source of the detection, black is hard, white is soft etc. I've done the usual searches but come up more confused than when I started. Does anyone have any pointers?

Yes, that's possible. You can use a lo-res version of the graphic.

Much depends on how smooth you want the action to be. Will you be generating a reflection vector from the pixel data? Doing it for a rough bounce is relatively easy, but doing it so that it's nice enough to handle, say, a ball rolling along the surface, is tricky. I once managed to get arbitrary bitmaps working well with a 100 dropped balls. You end up having to grab not just one pixel but a whole neighborhood of pixels.

This approach often leads to a related one where you start with a bitmap but end up with a grid of vectors.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  I have great idea for iOS game theCro 15 18,304 Nov 22, 2011 12:06 PM
Last Post: headkaze