I’m studying Defold and creating a card game like Hearthstone. I’m using the defold-input lib.
I want that when the cursor is over my card (a collection) the card zooms and increase the Y position. It partially works because theres an area within the card that the mouse is over and out at the same time. I think it is because the colision object, but I’m a newbie here and I did not figure out what is happening.
You are probably right that since you’re moving the card on the mouse over it may result in a mouse out as well. Does it work if you mouse over the card from the side or top?
Ok, got it. A simple solution is to use a collection per card. Each card consists of a root game object with the collision object and then also a child game object with the sprite. When you detect mouse over you move the game object with the sprite only for the visual effect of lifting the card.