- Home /
Sprite tilts left/right depending on how far it is from the center [C#]
Trying to make a game which has the "Tinder RPG" genre made by Reigns where you swipe cards left or right and it tilts the card depending on how far it is from the middle. I've tried transform.rotatearound, but I think I'm not doing it correctly.
What I am trying to do is this effect, but left and right.
unityquestion.png
(78.2 kB)
Comment
Answer by knobblez · Dec 02, 2018 at 06:07 PM
You don't need to rotate it. You need to move it on the X axis.
What you are doing right now is rotating it around something. Sun around the moon
I'm guessing at your needs though. Need code
I got the moving the card on the X-Axis right just fine, what I don't know what to do is to tilt the card.