say the cube, lets call it table, is in middle of a room
you simply draw a map (your room) with this table shape rect in the
color of your choice.
you add an event listener to this color.
At runtime you simply pass the coordinates in ratio to the reader.
(Very often the x and -z of the camera)
if the pointer is on the color, the event is triggered. If not while
you sure the location is correct, make sure its the right color, there
is a getter in the class for this, as bitmap compression do influence
color values.
What happends next is up to you. It doesn't necessary means collision
reaction
to correct the camera as its usually associated to.
It can also be combined with other collision detection systems.
Another use, I haven't seen yet for instance, is to use the uv's of a
mesh for the check. The map fitting
the mesh like its own map, it would allow to "read" the meshes in a
controled manner
without the need to have complex mouseEvents3D.
Hope it helps you getting started.
Fabrice
On Sep 19, 2010, at 10:57 PM, paschim wrote:
Wow thanks.....i didn't know i could search this group for previous
topics......I found some great code samples and learned a bit.
Next a small question: As you said in one of your earlier posts, it
simply fires an event by reading the color at a specified
position(that made understanding things a lot easier), so if I want to
test a model....say a cube, do I need to calculate its four corner
coordinates, or is there a shortcut?