News › Forums › RAIN › Sample Projects, How To, and Code › Combining Mecanim and RAIN: Part 1
This topic contains 29 replies, has 8 voices, and was last updated by prime 11 months, 1 week ago.
-
AuthorPosts
-
April 23, 2022 at 6:37 pm #12563
This is a first in a series of videos combining RAIN artificial intelligence engine with Unity Mecanim animations.
Please post your requests on what you would like to see as the series progresses or if you have any questions/comments. Enjoy!
Download the project file for the first 4 “Getting Started With RAIN 2.0.10″ video walkthroughs. Also be sure to read up on the Wiki for more specific detail and other examples.
Part 1: Get Started With RAIN 2.0.10 Video Walkthrough
Part 2: Get Started With RAIN 2.0.10 Video Walkthrough
Part 3: Get Started With RAIN 2.0.10 Video Walkthrough
Part 4: Get Started With RAIN 2.0.10 Video Walkthrough
- This topic was modified 1 year, 6 months ago by Jester.
April 24, 2022 at 2:05 pm #12635I’d like to see you set up 3 AI actions using this. These would include climbing up/down a ladder. Jumping from point A to point B (and back). Jumping to grab top of crate and pull self up (and jump off crate to ground).
These would be extremely helpful for me.
April 24, 2022 at 3:44 pm #12639Thanks redhawk for the feedback. I think understanding how to switch between animation states and using ‘one shot’ type triggers is key to working with RAIN and Mecanim. I would imagine to get started you would need to set up game objects that could act as a trigger.
Have you seen the original mecanim tutorial done by Unity and Will Goldstone? See https://www.youtube.com/watch?v=Xx21y9eJq1U
Will uses game object triggers when the AI run off the end of a box container that causes it to fall and roll. I would imagine you could create a trigger at a ladder that would signal your AI to switch to a climb animation. You could use Entity/Aspects for this too…
It sounds like a challenge and I may try to do something like this! I need to first make sure some of the basics are covered so people know how to use RAIN with mecanim. Then I can get into more examples with regards to general game development. I would also imagine mecanim IK would be needed and that will take the pro version, something I just don’t have right now
If you come up with anything I would invite you to share. I’m sure you’re not the only person that would like to see this. Anyway, I’ll try to incorporate what I can in each vid. Thanks!!
April 24, 2022 at 7:44 pm #12665Parts of this might be helpful. Let me know.
April 24, 2022 at 11:01 pm #12680Yep I saw this too. He actually took the mecanim video Will did and incorporated RAIN {indie} to do exactly what I was suggesting. Let me know if any of this helps you out redhawk. Thanks Jester!
April 26, 2022 at 11:45 am #12806That’s seems a useful video, but in the modern version of RAIN (2.0.11.0) I can’t see a way of doing one-way waypoints in the waypoint network. Also, the behavior editor seems very different to the video. Is there anything you have to do to get an AI to use the waypoints in a waypoint network, rather than the navmesh? I was hoping it would automatically take the network into account when it moved. It may just be my scene that’s wrong. Thanks!
June 17, 2022 at 11:30 pm #28113RAIN 2 uses Waypoint nodes in the behavior tree. To use a waypoint network, add a “Choose Path Waypoints” node from the Behavior Tree Actions menu. Then put your Move node inside it. Set the Waypoint Network to the name of your waypoint network in the scene (use quotes as “My Network”). Set your Path Target to a variable representing where you’re moving (no quotes for variable names) or set a navigation target (as navigationtarget(“MyTarget”)). Set the Move Variable to the name of the variable that the Move node you added will be moving to. (I usually use moveTarget). Make sure your Move node uses the same variable name.
That’s for a waypoint network used as a path, which is always “one way”.
July 20, 2022 at 3:14 am #32006Is Rain 2 compatible with Unity 4.5.2? I installed Rain in a new project today. When I selected my character and added ‘Create AI’ from the Rain toolbar it adds the attributes to my Inspector, but doesn’t show the Rain Interface or even display AI under my character in the Hierarchy. I loaded Rain 2 before upgrading to Unity 4.5.2 and the interface loaded (and still loads in that project) but the AI doesn’t work in mecanim or legacy animation modes. Back to the new project again. I can download and install Rain2, but cannot access the interface. Is Rain2 compatible with Unity 4.5.2?
July 20, 2022 at 3:27 am #32007Ok! The interface loaded on about the fourth attempt! Thanks!
September 3, 2022 at 12:22 pm #33104I happy that you do these tutorials, but not you should maybe get professionals to do the tutorials because you just make things confusing. Most of the time I’m just working out what you doing as appose to what your saying on the videos… OK maybe it’s just me, I’m sorry but I hope I’m not the only one?
Otherwise I eventual………………………………………………………………..ly get it working…
September 3, 2022 at 8:12 pm #33111@Ramsh - If you have specific questions related to the tutorials or topics covered in them, feel free to post the questions on the forums here to get them answered.
September 3, 2022 at 8:13 pm #33112Quick note though - the RAIN/Mecanim tutorials are outdated. We’ll get new versions done as soon as we can get to it.
November 11, 2022 at 11:48 am #34083nevermind, found solution to my question by realizing there were version differences and the root motion checkbox now exists in rain
Thanks anyways
November 11, 2022 at 2:01 pm #34088quickly ran into another problem, in the new version of rain when I’m doing this tutorial, if i apply root motion in both places (the model and the ai), he moves perfectly, but he doesnt follow the waypoints any longer
any suggestions?
November 11, 2022 at 3:25 pm #34089Your AI just walks straight?
Are you using turning animations with your root motion?
-
AuthorPosts
You must be logged in to reply to this topic.