Forum rules - please read before posting.
Tech questions during the weekend? Drop in on the community Discord channel!

Head turning always looks down

Hey all - 

Finally starting to look into getting head turning implemented in my project.  I'm using Mecanim characters and have defined the neck bone, setup IK Pass on my character's animation controller base layer, and have it looking at active hotspots.  It seems as though no matter where I go or how I have a hotspot setup, the player keeps looking down (although he keeps tracking the hotspot...just at a downward angle).  Am I missing a step in getting this setup?  I mean...it's fairly humorous to watch my character constantly look at his crotch, but methinks I'm doing something wrong...

:)

AC 1.45.  Unity 5 Pro.  

Comments

  • And what if you remove the neck transform?  If you do that, then the system will try to judge the relative height between head and hotspot by examining your player's Capsule Collider.
  • It actually still looks down. I've tried adding/removing a capsule collider as well (I'm using character controller with my player) and it does the same. Could the sphere collider on the the detect hotspot script on my player be interfering with this?
  • It shouldn't be, but have you checked by removing it temporarily?  Know that you can use a local instance of your player prefab - you don't need to update the prefab itself with any changes you make while testing.
  • Nah - seems to still take place.  I wonder if it's how the model is setup or something.  I'm using a character created/rigged in Mixamo's FUSE tool and then autorigged from their site...not sure if that helps at all.  :)
  • Just so that we can be sure this is a character problem and nothing to do with your Hotspots - does it work if you use Tin Pot as your Player prefab instead?
  • No, although, I didn't spend too much time with it to try and make it work.  I threw Tin Pot in, changed the animation engine to Mecanim and then set IK head turning on.  Not sure if I need to do more things with him to make that work, but with those quick steps, it didn't work.
  • No, that won't work - Tin Pot is animated using Legacy.  Don't edit the prefab - he'll use a different method to perform head turning, but we'll see if he's now looking in the correct place.
  • Okay - yeah, unedited Tin Pot works.  So much be something with my character model...
  • Good, that means we're closing in on it.  Post some screenshots of your player in the scene view, the Inspector window, and anything else that might be relevant (e.g. Mecanim / avatar settings).
  • Generally looks fine.  The only thing I can see that might cause a conflict is the Mixamo component.  It could be overriding the head lookat target.  Try temporarily removing it, and see if that solves it - at least then we'll know for sure.

    If you can't remove the component permanently, you'll have to consider non-IK head turning.  This would involve unchecking "IK head-turning" in the Player Inspector, and then supplying parameters for the head pitch and head float angles (and animations in your Animator to make use of them).
  • Okay - I've removed the Animation State Machine component (the Mixamo script) and it didn't seem to do anything, so I'm going to turn head turning off for the time being.  Might come back to it at some point.
  • Has this problem ever been solved for you?
  • I seem to remember having the same problem at some point. Think I solved it by adding a Head layer in the character's animation controller. 
  • No, I haven't revisited this for a bit.  I had to move onto other tasks before looking at it again.
  • Okay.  I think I have this working finally.  It took me going back and re-exporting my models and rebuilding my player from ground up, but it's actually behaving much better (not constantly staring at my shoes).  Nothing else seemed to be wildly amiss.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.
Do NOT follow this link or you will be banned from the site!