Page 1 of 1

New Feature: 3D Bounds Mouse Picking

PostPosted: Wed Oct 23, 2013 7:44 pm
by rob
This update is now available on the dev branch version 1.2.8 for all premium (paid) license users.

Example Updated: 14.1-isoobjects

By request I have added 3d bounds mouse events / picking. Instead of interacting with the red outline, it can interact with the green one as shown here:

ige_mouse_hit_over_entity.png
Mouse Interaction Bounds
ige_mouse_hit_over_entity.png (146.45 KiB) Viewed 22958 times

The default mouse to entity interaction is done against the entity's AABB (axis-aligned bounding-box) when in 2d and isometric bounds when in isometric mode. You can manually specify the picking mode as well.

To enable mouse events (mouseOver, mouseOut, mouseMove, mouseDown, mouseUp etc) against the 3d bounds, simply enable via:

entity.mouseEventTrigger('isoBounds');

To switch to using AABB (this is the default setting in 2d) simply use:

entity.mouseEventTrigger('aabb');

Mouse Picking In Action