News Forums RAIN General Discussion and Troubleshooting Mecanim Generic rig

This topic contains 17 replies, has 2 voices, and was last updated by  norbykov 1 year, 4 months ago.

Viewing 15 posts - 1 through 15 (of 18 total)
  • Author
    Posts
  • #6728

    norbykov
    Participant

    Hey guys, I’m trying to move a dinosaur around using waypoints (for now), and mecanimmotor. I use Root motion and override root motion rotation, but my dinosaur just turns to one point, and runs off into the sunset without following the waypoints. So my question is: does RAIN with Mecanim work with a generic rig? If so, is there any special settings I should pay attention to?

    Thanks!

    #6748

    prime
    Keymaster

    Yes, we use RAIN/Mecanim with generic rigs all the time. Try this as a test. Start by trying to move to a specific spot first, then move along waypoints after that. Let me know if it works. If so, we probably have a fix for you.

    #6751

    norbykov
    Participant

    Thanks for the reply prime. Is it important how I move to a specific spot? Should I do it within the BehaviourTree, or some other means?

    Cheers!

    #6757

    prime
    Keymaster

    The easiest thing to do is to drop a navigation target in the scene, name the game object something like “test target”, and then use a move node in the behavior tree with a Move Target of “test target”.

    The reason to try this: It may be that your dinosaur is trying to find an initial destination in the waypoints before a path graph is set. There are a few cases where this can occur. Trying to do a Move to a particular location first will force the graph to be set.

    Our 2.0.10 patch has fixes for this issue - if that’s the issue…

    #6764

    norbykov
    Participant

    Unfortunately it doesn’t work. The dino just stays there, doing the idle animation. As soon as I turn off “use root motion”, it nicely slides to the nav target. Could the problem be that I don’t have a turning animation? There is no walk left or walk right, etc animation for the dino. I assumed the “override root motion rotation” is kind of for that, but I might be wrong.

    #6784

    prime
    Keymaster

    Yes, Override Root Motion Rotation is for when you don’t have turning animations. What happens when you check that box?

    Also, you will likely have to change your Close Enough Distance when you are working with root motion. It is always less accurate and so the AI will require a little more error tolerance.

    If you do get turning anims, you will need to increase your close enough angle to account for the error there as well. I’ve had best results using an error of 3 to 5 degrees, and then setting up blend weights on the turn anims based on turn angle (not turn velocity).

    #6788

    norbykov
    Participant

    Nothing happens when I check Override Root Motion Rotation. What I noticed is that the Speed parameter on my Mecanim state doesn’t change at all when I add it to the Speed param on my Mecanim motor.

    #6789

    prime
    Keymaster

    Close enough distance can’t be 0. Especially with root motion. Try 0.5.

    You don’t want Allow 3D Movement or Allow 3D rotation - uncheck those.

    #6798

    norbykov
    Participant

    I’m sorry, it still doesn’t work. There must be something wrong with my setup or the animation itself, but can’t figure out what. The Speed parameter doesn’t change at all. I tried to turn the dinosaur all the way towards the navigation point, so it would start right away without turning to face the point, but nothing. I set up Mecanim Animator just to see if using the Speed parameter that way works, and it does, but the dinosaur doesn’t turn at all, just walks off whichever way its facing. I guess I have to dig deeper. Thanks for your help prime, and if there’s anything else you think I could try, please do let me know!

    #6799

    prime
    Keymaster

    If you want to send over a project, we’ll take a look and probably be able to figure it out in a minute or two. (We’ve done this a lot.)

    #6804

    norbykov
    Participant

    Oh, that would be awesome, thanks! Can I send you a link to download it in a private message?

    #6821

    prime
    Keymaster

    yes, or email it to jester [at] rival theory [dot] com.

    #6960

    norbykov
    Participant

    Hi prime, I was just wondering if you received the unitypackage i sent you via email the other day.

    #7013

    prime
    Keymaster

    we’ve had a busy couple of days here. I’ll check with Jester.

    #7073

    norbykov
    Participant

    Thanks prime, I appreciate it.

Viewing 15 posts - 1 through 15 (of 18 total)

You must be logged in to reply to this topic.