News Forums RAIN General Discussion and Troubleshooting Using Mecanim Animator (States)

This topic contains 5 replies, has 3 voices, and was last updated by  Archania 1 year, 5 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #6193

    mythgarr
    Participant

    I stumbled across RAIN the other day, and overall I like what I see! Your tutorial videos on navigating using a navmesh and using the mecanim motor are both excellent starting points. I haven’t been able to find anything regarding how I can use the Mecanim Animator, though - specifically, how do I configure the states and how will RAIN trigger the corresponding animations? What are the Start, Playing and Stop parameters? Is it possible to use Trigger parameters?

    It would be incredibly helpful to see a video that takes a more complicated Animator with several action animations and builds a behavior tree and AI that uses them.

    Thanks again for a great framework!

    EDIT: Finally found the edit button! Not sure if this is a bug or intended functionality, but the Turn Angle is specified in a range [-180,180]. Most Mecanim state machines are written to expect [-1,1]. The simplest way to transform one into the other would be to divide by the default rotation speed specified for the motor. Either this could be a separate param (‘Param Normalized Turn Angle’) or these could possibly be made into expressions?

    #6204

    mythgarr
    Participant

    I suppose it might be useful to say just what I’m seeing.

    I have configured the Motor to basically match what was shown in the Movement+Mecanim tutorial (http://youtu.be/Pi4t2IRkEL0?t=10m16s). In the youtube video with an earlier version of RAIN, these settings were made on individual specialized Mecanim Movement actions. In the latest the Motor is configured for the AI and (presumably) the move node is supposed to just use whatever Motor is configured.

    If root motion is turned on for the animator or motor, it causes several glitches during playback. After turning these options off the animation is now smooth, but the parameters aren’t correctly set to 0 when the player reaches the target causing them to walk in place. I could work around this by manually resetting the various Mecanim parameters when stopped, but it seems like this is something the motor should handle by default.

    The MecanimAnimator seems to sort of work - I’m probably just too inexperienced with behavior trees to see what I’m doing wrong. I have a PAR node with an animate & wait child. The intention is that it jumps into a Crouch state for a few seconds, then finishes (this is just a test scene to get it working). Instead, they crouch for a single frame, stand back up, and execution resumes after several seconds. If the animate node repeat forever the entire PAR block will just sit there (since all nodes are never done).

    I would really appreciate any advice or sample code that anybody could point me to.

     

    EDIT: It looks like I was using version 2.0.7 when I tested the MecanimMotor - that seems to be working fine now. The states for MecanimAnimator also seem to be working - they set the parameters specified when entering, running, and leaving a given state. It looks like the state remains fixed until another state is explicitly set. I haven’t checked to see how this interacts with the Move node, but 2.0.8 seems to have fixed a lot of the problems I was seeing.

    #6245

    prime
    Keymaster

    We’re still working through integration issues with Mecanim - which is itself a moving target. We’ll try to put out a tutorial vid soon on Mecanim, and will keep trying to simplify and improve the setup.

    #6509

    Archania
    Participant

    Any update to a tutorial using RAIN and mecanim? Looking forward to getting more in depth on how to use them both.

    #6513

    prime
    Keymaster

    RAIN 2.0.9 with some Mecanim fixes will be released on Monday. Once that’s out, we will be working toward finishing up the 2.0.10 release, which will be specifically targeted toward the 4.3 builds of Unity and the associated changes to Mecanim. For example, we’ll add support for Triggers and remove no longer used parameter types. This will also help simplify the animation state setup. It will probably take about 2 weeks to get the release ready to go.

    Once we release 2.0.10, we’ll follow right away with the Mecanim tutorial.

    #6578

    Archania
    Participant

    Sounds great. Awesome work too. Keep it up.

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.