Page 1 of 1

mouse hit over 3d entities

Posted: Fri Oct 18, 2013 6:08 am
by stokaboka
Hi!

mouseOver, mouseUp, mouseLeave fire over red box...
how to make fire mouse events inside 3d bounds (green line area) ?

Re: mouse hit over 3d entities

Posted: Tue Oct 22, 2013 10:17 pm
by coolbloke1324
stokaboka wrote:Hi!

mouseOver, mouseUp, mouseLeave fire over red box...
how to make fire mouse events inside 3d bounds (green line area) ?
Hi ya!

I have updated the engine to allow for mouse picking / intersection checking with iso-3d bounds. The updates have been pushed to the dev branch in the premium repo, version 1.2.8.

You can see how it works in example 14.1-isoobjects as you move the mouse over the isometric objects they are highlighted.

To make mouse events work based on the 3d bounds you can just set:

Code: Select all

entity.mouseEventTrigger('isoBounds');
This will tell the engine to check the mouse pointer against the iso 3d bounds of the object instead of it's default AABB.

Let me know if that works ok and if that is what you needed!

Re: mouse hit over 3d entities

Posted: Wed Oct 23, 2013 6:36 am
by stokaboka
thanks Rob!

Code: Select all

entity.mouseEventTrigger('isoBounds');
it works perfectly, exactly as expected )

but.... I can use v1.2.8 @ 2013-10-22.002 a production application ?
this is dev branch...

Re: mouse hit over 3d entities

Posted: Wed Oct 23, 2013 6:51 am
by coolbloke1324
Hey ya. Yes that should be fine. This version has been tested and it did not break any existing functionality.

The dev branch will be merged into master next week.

Re: mouse hit over 3d entities

Posted: Wed Oct 23, 2013 7:17 am
by stokaboka
ok, thanks )

Re: mouse hit over 3d entities

Posted: Sun Oct 27, 2013 10:53 am
by alex_king92
Hi, I've just downloaded again the engine, but it has downloaded v1.2.4@2013-10-07.001 version and not the latest you told.

Re: mouse hit over 3d entities

Posted: Sun Oct 27, 2013 12:01 pm
by alex_king92
Found! xD Really great update!

Re: mouse hit over 3d entities

Posted: Sun Oct 27, 2013 12:27 pm
by coolbloke1324
alex_king92 wrote:Found! xD Really great update!
Thanks :)