unityscript - Unity3d Character rotation direction -


I am using character controller velocity to specify the trajectory.

  Function FaceMovement Direction () {Var horizontal altitudes: vector 3 = character. Discretion; Horizontal Velocity.y = 0; // Ignore the vertical movement // If a new direction is moving to a great extent, then in that direction, point to that character if (horizontal unlimitedity. Mnniti> 0.1) This transformerForward = horizontal unlimitedity. }  

My problem occurs when the character kills an obstacle, the velocity for that axis is 0 and it leads to the side.

How to make ideas of any solution?


Comments