Hello,
How to obtain the position of the mouse on an object ?
-----
Comment obtenir la position de la souris sur un objet ?
Develop games in your browser. Powerful, performant & highly capable.
Do you mean how far the mouse is over the object? If i understand you correctly you could try something like this,
x = sprite.BBoxleft + (mouse.x - sprite.BBboxleft)
y = sprite.BBoxTop + (mouse.y - sprite.BBoxTop)
Good evening, thank you, I did like this:
Mouse.X("Layer 1") - Object.X Mouse.Y("Layer 1") - Object.Y
-----------------
Bonsoir, merci, j'ai fais comme ceci:
Souris.X("Calque 1") - Objet.X Souris.Y("Calque 1") - Objet.Y