Search Unity

Determine the direction for Mecanim

Discussion in 'Scripting' started by shoo, Mar 27, 2014.

  1. shoo

    shoo

    Joined:
    Nov 19, 2012
    Posts:
    67
    Hello! I have an animation controller with 2D blend tree inside for forward/back/right/left move animations. The problem is that my project have a top-down view and if I pass Input.Axis parameters directly to controller, then it works relatively to character direction, but charactrer direction always corresponds to mouse pointer. So I need to get parameters for my 2D blend tree that will specify corresponding movement relatively to world axises. But I have no idea how to do it. Is any decision here?
    $движение.png