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.
January 30, 2023 at 5:51 pm #6728
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!January 31, 2023 at 5:40 pm #6748
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.January 31, 2023 at 8:53 pm #6751
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!February 1, 2023 at 12:41 am #6757
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…February 1, 2023 at 8:16 pm #6764
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.February 3, 2023 at 2:54 pm #6784
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).February 3, 2023 at 3:22 pm #6788
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.
February 3, 2023 at 3:32 pm #6789
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.February 3, 2023 at 6:04 pm #6798
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!February 3, 2023 at 6:13 pm #6799
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.)February 3, 2023 at 6:31 pm #6804
Oh, that would be awesome, thanks! Can I send you a link to download it in a private message?February 4, 2023 at 3:43 am #6821
yes, or email it to jester [at] rival theory [dot] com.February 6, 2023 at 8:00 pm #6960
Hi prime, I was just wondering if you received the unitypackage i sent you via email the other day.February 7, 2022 at 2:37 pm #7013
we’ve had a busy couple of days here. I’ll check with Jester.February 8, 2022 at 5:18 pm #7073
Thanks prime, I appreciate it.
You must be logged in to reply to this topic.