Hi,
I've built MouseHexMapLayer as
class MouseHexMapLayer(cocos.tiles.HexMapLayer):
is_event_handler = True
def __init__(self, mapLayer):
self.__dict__['mapLayer'] = mapLayer
#mapLayer.set_debug(True)
def on_mouse_press (self, x, y, buttons, modifiers):
cell = self.mapLayer.get_at_pixel(x, y)
...
I've been finding that get_at_pixel works near the origin, but tends
to be wrong further away (clicking on the bottom of a cell selects the
cell below rather than the desired cell). Is this a known issue or
perhaps I'm doing something wrong?
Happy to send the full code if desired.
Thanks,
Chris
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"cocos2d discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/cocos-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---