Hello!
Is there any mouse hover/hover start event for image/text, not only for button in PlayCanvas?
Hi @Gradess,
No, there isn’t, you will have to program that behavior using the mouseEnter/mouseLeave events.
this.entity.element.on('mouseenter', this.onEnter, this);
this.entity.element.on('mousedown', this.onPress, this);
Check the following example:
https://developer.playcanvas.com/en/tutorials/ui-elements-buttons/
It uses buttons, but the same logic applies for any image or text element that has Use Input enabled.
3 Likes
Ok, thank you!