Forum rules - please read before posting.

Player animations not transitioning

I am building the NPCs and Players I will need.
Last week I did a quickie run through with a bought character, which came with a few animations and it worked flawlessly, I had the player walking and running in no time.

Today (and yesterday) I have been struggling just to get the animations to play (apart from the default Idle anim)

First of all the main difference is that my animations and character models do not come from the same place, but all the characters avatars are correct. (getting a tick mark in avatar definition)
I tried (while following http://www.adventurecreator.org/tutorials/making-mecanim-based-character) but the character did not animate, altho it did move around

So then I tried the approach mentioned in http://docs.unity3d.com/Manual/Retargeting.html which specifically places the character model INTO a game object that has the character related code on it.

My parameters are set correctly and the same as in mecanim parameters.

What I get is a character that IS running the idle animation, and is rotating and moving correctly but NOT transitioning to the walk or run...

heres the stuff...
image

image

and heres a hint

image


While Im here, the one I did get working last week, I did not get run to work, I suspect the Run Settings in Input are wrong, image

Comments

  • Some success suddenly. It was all a matter of hierarchy.
    I had the Player script on the root game object, and the character model was a child of that.
    BUT I had the Animator component on that child, so presumably the Player script cannot see down into the child, but only at the same level. So when I moved my Animator up a level to the root, it worked, sort of... theres a lag before he starts to walk, his movement is very fast and the animation slow, then after a while he gets stuck on a frame (maybe the end of the animation, somehow need to loop it???) but transitions back to Idle successfully.

    BUT!! JUST NOTICED.. Im still getting the above errors
    Parmeter "moveSpeed" does not exist etc...

    DAMN!!!

    here below is my heirarchy:
    PlayerTrent
    transform
    capsule Collider
    RigidBody
    Animator
    Paths (script)
    Player(script)
    Character_model2
    transform
    hips
    >bonestructure not shown
    mesh
    Camera
    transform
    camera
    FirstPerson camera (script)


  • Fixed... Sometime it helps just to write it down.
    I hope my rambling threads are seen as possible helps for future users rather than just psychotic rambling?

    OK, I forgot I had another NPC in the test scene, all the error were pertaining to that character... deleted him from the scene and it worked. Just going to test with the different heirarchiys.

    If you could just breifly look at the above heirarchy, t would be good to know if THAT SHOULD work, as this is slightly simpler to change character models, despite everything being a child of a dummy Game Object that holds all the scripts and componenst, this way I can just swap the model. Would be quicker.
  • Having the model as a SkinnedMeshRenderer child object is generally how rigs are done in Unity - it's the same thing with Tin Pot in the 3D Demo.  The main thing is that you have the Player and Animator components on the root object, which is necessary.
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.