Unity eventtrigger for a flipped gameobject

24 Views Asked by At

So I have "n" number of child gameobjects that are sorted by the parents horizontal layout component.

These child gameobjects are cards, they have a front and a backside represented with different images.

To flip the card I change the y rotation of the gameobject and switch the image sprite.

The flipping works and looks fine.

GOAL: I want to add an eventtrigger to be able to call my flip method when the gameobject or the image is clicked.

Problem: The eventtrigger doesn't seem to work on rotated gameobjects.

I don't really want to use colliders because then I would need to update collider sizes all the time and I dont think thats necessary.

1

There are 1 best solutions below

0
ChrisCross On

Disabling "Ignore Reversed Graphics" in Canvas setting fixed this problem.