News › Forums › RAIN › General Discussion and Troubleshooting › Character animates correctly, but does not move.
Tagged: Way
This topic contains 17 replies, has 4 voices, and was last updated by CodersExpo 1 year, 2 months ago.
-
AuthorPosts
-
March 30, 2022 at 3:37 pm #10949
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.March 31, 2022 at 4:14 pm #10993Are 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/mechparemIf 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.
March 31, 2022 at 8:11 pm #11018Parallel 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/mechparemThat 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.
April 8, 2022 at 9:48 pm #11549Any solution?
This is seriously annoying me.April 9, 2022 at 3:07 pm #11585We 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,
JesterApril 11, 2022 at 9:38 pm #11753Even 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 ()April 12, 2022 at 4:13 pm #11806This 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.
April 12, 2022 at 10:05 pm #11833I 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
CharacterMotorApril 12, 2022 at 11:54 pm #11840Ok, 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
@CodersExpoApril 13, 2022 at 12:03 am #11841Confirmed: Terrain does not allow movement via RAIN.
@Prime is there a workaround or fix?April 14, 2022 at 3:42 am #11915You 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.
April 14, 2022 at 8:41 pm #11939Fixed, the error was both the route was slightly below the surface, as well as the navmesh was not properly generated.
April 17, 2022 at 10:51 pm #12209New 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/3azl4vApril 22, 2022 at 9:43 pm #12492How 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?
April 22, 2022 at 9:47 pm #12494The terrain is the standard terrain size, the NavMesh is size 10.
Latest version: Yes.
Not tested if smaller. will do soon. -
AuthorPosts
You must be logged in to reply to this topic.