Novelty scripting reference > Scripted events > OnMouseEnter


This event is triggered when the mouse cursor passes into the bounding box of an object.


The mouse coordinates given are relative to the center of the scene. To make them relative to an object or the top left corner of scene use TransformToObjectCoord or TransformToSceneCoord respectively.

Implicit arguments

Object@ sender
Handle to an associated object; or null.

float mouseX
Horizontal cursor position.

float mouseY
Vertical cursor position.


event Sample.OnMouseEnter
	// Get relative point where cursor entered on the object   
	Vector2 Point = TransformToObjectCoord(sender, mouseX, mouseY);

Back to top