News › Forums › Sample Projects, How To’s, and Code Samples › No movement from AI prototype
This topic contains 6 replies, has 4 voices, and was last updated by prime 1 month, 3 weeks ago.
July 15, 2022 at 12:51 am #31545
I just downloaded RAIN (184.108.40.206) last week, and spent a couple days since trying to get a basic example of a rig to work with no success. I’m using Unity 4.3.2f1 on a MAC OS X version 10.8.5.
I’ve made a navmesh using the RAIN interface rather than the Unity navmesh component on a simple flat terrain that is 100×100. I am using a capsule for my AI character stand in. I’ve applied the capsule to an empty game object that has its transform on the surface of the terrain. The AI component is added to the same game object. I added a visual sensor called “eyes” to the AI and am using a node type “Detect” called “detect” using sensor “eyes” looking for aspect “Human” and form variable “detectTarget”. This node repeats forever. In parallel I’m using a “Move” type node called “move” repeating UntilSuccess with a Move Target of “detectTarget”. I then added an entity to my FPS character object with a visual aspect “Human”. So my capsule should start to follow my FPS player around the screen when it gets close enough.
I get no movement from the capsule. I got the following warning just now when I finished all of the above (I reconstructed the scene while I was writing this so I had all the details). I didn’t remember seeing that the other times I set this up.
Assets/AI/Actions/WayPathLocation.cs(41,51): warning CS0618:
RAIN.Navigation.NavigationManager.instance' is obsolete:instance is deprecated, please use Instance instead.’
So I also just did a find/replace for instance -> Instance. Still no movement from my capsule.
Other settings include:
Use Unity Messages: Checked
Use Fixed Update: Unchecked
Body = parent game object with transform at surface of navmesh
Memory = BasicMemory
Mind = BasicMind
Motor = BasicMotor
Animator = BasicAnimator
Navigator = BasicNavigator
On my parallel root node I have set to repeat forever, Fail any, succeed any, tie breaker succeed.
I’ve tried different hierarchies, different motor options. I really can’t see what I’m doing wrong. Any help would be appreciated.
Also, when I import and open the “Starter” scene, all of the RAIN scripts are missing from Max, Hero, and the navmesh.
August 6, 2022 at 5:26 am #32656
- This topic was modified 5 months, 2 weeks ago by SpazzTech.
I’m currently evaluating Rain on Unity 4.5.0f6 on windows and am getting the same problem.
I followed the video guide from https://www.youtube.com/watch?v=sPpaB71UUEI&list=UUHfVoqUJiIrAjW_ENCWsJ_g to the letter (for the second robot and navmesh) but it either won’t detect or move to detected
Have you by chance found the problem and/or it’s solution?August 22, 2022 at 12:59 am #32965
Not sure what the issue was, but there’s a new tutorial project out there along with a new version of RAIN. The matching tutorial video will walk you through getting a character moving.
Generally I would suggest starting a bit simpler to make sure everything is working, then move to a more complex example (using Sensors, etc.) For example, you could throw a capsule on a plane, create AI on it, gen the navmesh (make sure it didn’t create a hole where the AI is standing), and then create a behavior tree with a single Move node. set the move target to some vector3 location e.g., (5,0,5), and hit play. It should move.November 3, 2022 at 11:33 am #33860
Is there another video for 2.1 setting up character and patrolling, I can’t seem to get the character to move through each waypoint, it sort of just moves around pauses changes direction and moves again. I’m doing something wrong.
November 3, 2022 at 12:30 pm #33864
- This reply was modified 1 month, 3 weeks ago by JeffTech.
We’re working on some new samples that will start shipping as part of RAIN. In the meantime, please send an email to jester at rival theory dot com and he’ll hook you up with a sample project that shows how to get patrolling working quickly.November 3, 2022 at 3:46 pm #33870
I finally got it working, had to remove the quotes around the waypath name in the editor. It’s the little things that aren’t shown that always cause the problem Thanks for the response.November 4, 2022 at 9:13 am #33877
Glad you got things working!
You must be logged in to reply to this topic.