Search Unity

Stuck badly with pivot puzzle..

Discussion in '2D' started by djoshi, May 18, 2014.

  1. djoshi

    djoshi

    Joined:
    Mar 28, 2014
    Posts:
    182
    I have 2D sprite character with hole in it. I want to pass object from its hole my character is traveling in X direction constantly(Automatic). So to pass object from hole I have to rotate sprite in Z a bit (towards screen- using 3D Space). Now for constant X direction motion I have to use world axis(space.world) for rotation(Using buttons) I want to use local axis(So that I can control its direction of movement) but since the object is rotated its local axes is also rotated.

    So the problem is:

    1) If I use local axes for constant motion rotation I can get desired control on character but the the x axes is rotated so character goes in Z of world axes.

    2) If I use World for both I get constant motion in X but rotation does not change direction of character.

    Now possible solutions coming in my mind:

    1) I create hidden geometry make character a child of it.

    2) If I can rotate local pivot,:confused: but how?

    3) Trying gizmo but how to get results confusing for me..

    if someone can come out with solution please..