Forum rules - please read before posting.

NPC driven fully by mecanim?

We're just getting started with AC, I'm playing around with things and I'm curious what the simplest approach is to get NPCs whos movement is driven by rootmotion in their animator and still easily responds to Character: Move to point actions and whatnot. Right now if rootmotion is active my character only moves forward. 

Is it as simple as having rootmotion enabled, but simply setting things up using the Turn float setting in the Mecanim parameters section of the NPC component? 

Thanks.

Comments

  • The Root Motion Turning slider doesn't seem to have any effect.  I was hoping it was as simple as setting that to zero and I could get away with a single idle/forward walk while still using root motion.  Without root motion we get foot sliding, as you'd expect.
  • edited August 2018
    Welcome to the community, @nRedux.

    It should be as you expect - with a Root Motion turning value of 0, turning should occur regardless of you defining a "Turn float" parameter - which in that case would be purely cosmetic.

    Try loading up the 3D Demo.  If you enable "Root Motion" on the Demo player, Tin Pot, then you should find that he is able to turn (but not move, since his animations aren't equipped for it).

    Let's see your Player's full Inspector and Animator Controller - there may be some key setting that's been missed.  Please also let me know your Unity and AC version numbers.

    Also be sure to check out the "Precision movement" chapter of the AC Manual, which gives some tips regarding Root Motion including use of a Blend Tree.
  • https://imgur.com/a/NQ59nqE

    There's the full inspector and animator.  Simplest possible setup. I'll read that section in the manual.  I did look at the demo but I'll look at that character again. Lemme know if you need any more information.  
  • using AC version 1.64.5 and my Unity version is 2018.1.1.f1
  • You don't have Root Motion checked on your Rigidbody.

    I also don't know the effect that "Obi Rigidbody" is having on your character, so I'd recommend leaving any custom scripts or systems off your character before the issue is resolved so as to ensure there's no conflict.

    All looks fine otherwise.  If you make those two corrections and there's still an issue, please PM me a .unitypackage file of the character and I'll take a look at it - I'll need the model, animation and animator controller assets as well as the NPC as a prefab.
  • It's strange, but it seems to work if I have the Root Motion Turning set to anything but 0 or 1.  Any value in between is fine, but those exact values cause it to not turn at all.
  • edited August 2018
    Again though, I'll need to see it for myself in order to properly diagnose the issue - I can't recreate any such problem on my end.
  • I'll dig into this more soon, I do appreciate your responsiveness, I'm just under some tight deadlines for producing a prototype at the moment.  The current state works well enough for my needs even though as you've noted clearly something is wrong with my setup on some level.  

    Thank you very much.
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.