News Forums RAIN General Discussion and Troubleshooting Character animates correctly, but does not move.

Tagged: 

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

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

    JamieSinn
    Participant

    I have a simple movement AI setup, very much like the getting started tutorial has, however, my character animates correctly, but does not move.
    I cannot attach my project, as it contains NDA sensitive material with Nintendo as my game is going to be on the Wii U.
    I have tried the CharacterControllerMotor, as well as both MecanimMotor and BasicMotor, none of which work.

    Is there a way I can get my character moving?
    Thanks.

    #10993

    abchiptop
    Participant

    Are you using a waypoint path? if so the nodes need to look like this, as the video tutorial is massively outdated by like 4 versions (there’s an updated text tutorial on the wiki).

    Parallel Root (repeat forever, fail any, succeed all)
    -WaypointPatrol (name: waypoint route name, moveTarget variable is your moveTarget, Never repeat, i did loop forward)
    —Move (repeat never, move target is moveTarget variable)
    -animate/mechparem

    If you’re using mechanim animation, you’ll just want to set the variable state using mechparem to change animation states, i’ve found that’s not too hard to do if you have a mechanim rig. Just make sure the move is the child of WaypointPatrol, and move will auto repeat on fail until it reaches moveTarget (which then gets moved, as the waypointpatrol runs again, letting your character path to the next).

    If you’re using a network, i’ll dig up the info on that, but don’t bother with those right away, you’ll have a lot of headaches and a weekend’s worth of sleepless nights (i did!)

    also:

    Do you have a rigidbody on the AI? If so, make sure your constraints aren’t locking it down (you’ll want one anyways for collision detection).

    Do your animations have RootMotion? I had issues with animations that didn’t have xy motion in them.

    #11018

    JamieSinn
    Participant

    Parallel Root (repeat forever, fail any, succeed all)
    –WaypointPatrol (name: waypoint route name, moveTarget variable is your moveTarget, Never repeat, i did loop forward)
    —Move (repeat never, move target is moveTarget variable)
    –animate/mechparem

    That is all correct

    I am using legacy animations
    I could use a network if needed, but no, I am not atm.

    No rigidbody, as I am using a character controller.

    #11549

    JamieSinn
    Participant

    Any solution?
    This is seriously annoying me.

    #11585

    Jester
    Keymaster

    We have brand new tutorials for RAIN v2.0.10!

    http://rivaltheory.com/forums/topic/get-started-with-rain-2-0-10-video-walkthrough/

    Check them out and let me know what you think.

    Best,
    Jester

    #11753

    JamieSinn
    Participant

    Even with the tutorials, I am constantly getting the error:
    NullReferenceException: Object reference not set to an instance of an object
    RAIN.BehaviorTrees.BTWaypointNode.Start (RAIN.Core.AI ai)
    RAIN.BehaviorTrees.BTNode.Run (RAIN.Core.AI ai)
    RAIN.BehaviorTrees.BTSequencerNode.Execute (RAIN.Core.AI ai)
    RAIN.BehaviorTrees.BTNode.Run (RAIN.Core.AI ai)
    RAIN.Minds.BasicMind.Think ()
    RAIN.Core.AI.Think ()
    RAIN.Core.AIRig.AIUpdate ()
    RAIN.Core.AIRig.Update ()

    #11806

    CodersExpo
    Participant

    This is most likely due to not having the behavior tree waypoint node assigned with the name of your Waypoint component. In the behavior tree select the Waypoint node and check the field ‘Waypoint Route’ and make sure the name ‘PatrolRoute’ (or what ever you named your Waypoint rig) is entered and spelled correctly.

    #11833

    JamieSinn
    Participant

    I have fixed the NullRef error, but now, back to the beginning, I am just having a character being animated, but no movement.
    Is there any way something could be interfering?
    The only components on the character I am trying to work with are:
    Animation
    CharacterController
    CharacterMotor

    #11840

    JamieSinn
    Participant

    Ok, so I have my test scene working, except its on a plane, while the one that is not working, is on a terrain.
    Is that a possible issue
    @CodersExpo

    #11841

    JamieSinn
    Participant

    Confirmed: Terrain does not allow movement via RAIN.
    @Prime is there a workaround or fix?

    #11915

    CodersExpo
    Participant

    You should be able to use terrain. Make sure you have generated the navigation mesh, waypoints are on the surface, your behavior tree is assigned to the AI, nodes are set up per the videos for simple waypoint patrol. Without seeing an example I’m not sure… but if these things are in place, it’s got to be some small detail.

    #11939

    JamieSinn
    Participant

    Fixed, the error was both the route was slightly below the surface, as well as the navmesh was not properly generated.

    #12209

    JamieSinn
    Participant

    New problem, NavMesh is at what looks to be 100%, but is not, it does this for hours, then crashes.

    Here is an image of it:
    http://prntscr.com/3azl4v

    #12492

    CodersExpo
    Participant

    How large is the terrain? Do you have the latest version of RAIN? It runs for hours?? Do you have the same issue if the terrain is smaller?

    #12494

    JamieSinn
    Participant

    The terrain is the standard terrain size, the NavMesh is size 10.
    Latest version: Yes.
    Not tested if smaller. will do soon.

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

You must be logged in to reply to this topic.