Hello
I want to mask a group when the mouse does not move any more (script OK for this) but I want that this group displays when the mouse moves.
Thank you
Code.JS
// Group to be masked
var A_Masquer_NOM1 : GameObject;
var maxIdleTime : float = 5;
private var timeCount : float = 0;
private var lastMousePos : Vector2 = Vector2.zero;
function Update() {
if(lastMousePos == Input.mousePosition) {
timeCount += Time.deltaTime;
if(timeCount > maxIdleTime) {
//
//Group masked
A_Masquer_NOM1.SetActive(false);
timeCount = 0;
}
} else
timeCount = 0;
lastMousePos = Input.mousePosition;
}