IgeViewportviewportThe viewport to use as the base from which the mouse position is determined. If no viewport is specified then the current viewport the engine is rendering to is used instead.
Returns IgePoint3d The mouse point relative to the entity center.
Get the mouse position relative to the entity
// The returned value is an object with properties x, y, z
var mousePos = entity.mousePos();