ChrisCross
ChrisCross

Reputation: 101

Unity eventtrigger for a flipped gameobject

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.

Upvotes: -1

Views: 32

Answers (1)

ChrisCross
ChrisCross

Reputation: 101

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

Upvotes: 0

Related Questions