Swiping characters in a rotatory motion

I have three characters and I want them to be rotated in a circular motion with their faces turning towards camera. The user can select the one .For example refer the below image ., If I swipe left or right the rotation should exactly position the other corner in either way provided the characters are placed on the corners. .Can u ppl suggest any ideas

2852824--208479--Screen Shot 2016-11-15 at 6.58.53 pm.png

emptys act as references for the positions , the swipe thingy, rotations … looks simple git gud
:stuck_out_tongue:

do you have suggestions @ bucky

Two approaches I can think of:

  • Animate the three characters rotating 120° left and right, so 6 animations would be needed.
  • Code the 120° rotations over time (see the API Transform details for methods to do this).

So the above assumes you have a central pivot GameObject then the three characters under that pivot.

To keep the characters looking at the camera there is a Transform.LookAt function.

Hope this helps.

PS. Third option have your animator do the animations, if they are good they will probably add cool things e.g. the characters walk/dance/jump to the desired location with a style that reflects their character.

1 Like

ok …let me try that , Thank you @ arowx

Not identical to what you need, but seems to be pretty close.