Constructor
Variables
bestMatch:Bool
Is it required to find the best hit point in a complex mesh or any hit possible point will be enough (default = false, faster).
preciseShape:Null<Collider>
If several interactive conflicts, the preciseShape (if defined) can be used to distinguish between the two.
priority:Int
In case of conflicting shapes, usually the one in front of the camera is prioritized, unless you set an higher priority.
Methods
dynamiconClick(e:Event):Void
Sent when Interactive is clicked by user. This event fired only on Interactive that user pressed and released when mouse is inside Interactive hitbox area.
dynamiconOut(e:Event):Void
Sent when mouse exits Interactive hitbox area.
event.propagate
and event.cancel
are ignored during onOut
.
dynamiconOver(e:Event):Void
Sent when mouse enters Interactive hitbox area.
event.propagate
and event.cancel
are ignored during onOver
.
Propagation can be set with onMove
event, as well as cancelling onMove
will prevent onOver
.
dynamiconRelease(e:Event):Void
Sent on multiple conditions. A. Always sent if user releases mouse while it is inside Interactive hitbox area.
This happends regardless if that Interactive was pressed prior or not.
B. Sent before onReleaseOutside
if this Interactive was pressed, but released outside it's bounds.
For first case event.kind
will be ERelease
, for second case - EReleaseOutside
.
See onClick
and onReleaseOutside
functions for separate events that trigger only when user interacts with this particular Interactive.
dynamiconReleaseOutside(e:Event):Void
Sent when user presses Interactive, moves mouse outside and releases it. This event fired only on Interactive that user pressed, but released mouse after moving it outside of Interactive hitbox area.
preventClick():Void
This can be called during or after a push event in order to prevent the release from triggering a click.