Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Generic rig, Head rotates on LookAt but is tilted sideways

Discussion in 'Animation' started by luukvanoijen, Nov 16, 2015.

  1. luukvanoijen

    luukvanoijen

    Joined:
    Sep 15, 2015
    Posts:
    32
    Hi

    I just made a little project and it works great. Except for this:
    Code (CSharp):
    1.     void LateUpdate () {
    2.         float distancetoplayer = Vector3.Distance(Wolf.transform.position, Player.transform.position);
    3.         if (distancetoplayer < 6) {
    4.             //neckBone.transform.eulerAngles = headRotYobject.transform.rotation.eulerAngles;
    5.             headBone.LookAt(PlayerLookPoint.position);
    6.             //neckBoneRotation = neckBone.transform.rotation;
    7.         }
    8.     }
    This succesfully rotates the head in the players direction, but it gives this as a result:

    upload_2015-11-16_19-24-47.png

    Sorry about the two screen screenshot. I have 2 screens, so Printscreen gives me this :p
    But could any of you help? If you need more information, just say it.

    --Lucky upload_2015-11-16_19-24-47.png
     
  2. Fox_GAMING

    Fox_GAMING

    Joined:
    May 7, 2018
    Posts:
    12
    Were you able to figure it out? Also, you can use Ctrl+Alt+PrntScrn to take a screenshot of your current screen.