News › Forums › RAIN › General Discussion and Troubleshooting › Character walks half way under ground
Tagged: AI, navigation mesh, Terrain, waypoint
This topic contains 12 replies, has 6 voices, and was last updated by bucketloader 4 months, 1 week ago.
September 13, 2022 at 7:27 pm #33259
I’m not exactly sure what information to include besides that the character walks halfway underground. He is using a waypoint route and a nav mesh on a terrain. The character is just a cube. any idea whats happening? I have 3d movement checked.September 15, 2022 at 2:02 pm #33269
1) Don’t use 3D movement
2) Put a capsule collider on your character and a rigidbody. Constrain the rigidbody in x/y/z rotation and x/z positionOctober 18, 2022 at 2:52 am #33438
I got the same problem. My charater walks through terrain and under it between couple of waypoints (not all). I have attached a rigibody and applied the relevant constraint, but still no luck.
Can you anybody help?
October 20, 2022 at 2:40 pm #33446
- This reply was modified 8 months, 3 weeks ago by deal2014.
Not sure what the issue is. I had this happen recently when I spawned a character at runtime, but in that case I actually spawned the character too low and he stayed there.
If you don’t have 3D movement checked, then the AI only ever attempts to apply motion in the X/Z plane. It shouldn’t have the ability to cause vertical positioning problems.October 20, 2022 at 2:42 pm #33448
It still is broken for me too. It appears to be an issue with rigid bodies.November 9, 2022 at 8:28 am #34000
Same here -the standard ‘Max’ character is walking into terrain and disappearing half way under when traversing waypoints. Im using Unity Free with Rain 188.8.131.52
I have tried with and without 3d space, rigidbody, capsule collider. Nothing seems to make a difference. Works perfectly with a plane, but I want to use it with a terrain, where the characters will move around a hilly, forested environment, so walking thru the terrain is not an option…
Could anyone confirm whether normal terrain navigation (ie up and down) is even possible in Rain?
Ideally, if anyone could post a file that is working for them, that would be awesome!
ANovember 10, 2022 at 9:03 am #34005
Is this happening when you upgrade one of our sample projects? I ran through about 15 different projects last week - with terrain and with planar surfaces. Never saw the issue.November 10, 2022 at 9:23 am #34011
ah right, thats promising to hear that it is supposed to work! I havent seen any examples where there was a terrain only flat planes. Now I know its supposed to work I will keep trying till I crack it. Meanwhile, if you know of a sample project where a character walks up and over a small hill to get to a nav point (rather than walking thru it) that would be really awesome.
Big ThanksNovember 10, 2022 at 9:49 am #34012
Okay, this is where Im at:
* I downloaded the ‘RAIN Starter Project 1′ again from the rivaltheory.com/community/tutorials page.
* I installed into a fresh Unity project
* I deleted the plane object and added a terrain object, resized to 100 x 100, and positioned roughly where the plane was.
* I added a small mound across the middle of the terrain, seperating the starting positions of Max and the Hero. (not steep, roughly up to chest height on Max)
* I regenerated the Navigation Mesh
* I run it. Walk towards Max, he runs straight through the hill towards me.
Ive tried amending some of the settings (increase Max Slope, Walkable Height, Step Height) but always the same. I MUST be missing something! I really want to use this package for my project, but success is proving elusive!
As Prime has said he’s not seen this issue I have to assume there is something wrong with my setup (basic Unity Free, latest RAIN) but surely someone else has encountered this? All I want is for characters to walk up and over hills without sinking inNovember 11, 2022 at 8:54 am #34082
The Max character from our starter project doesn’t have a collider on it. RAIN doesn’t move the character vertically - it let’s physics and colliders handle that.
Try adding a rigidbody to Max. Set the constraints to constrain everything but y position.
Then add a capsule collider and position it correctly (default you will need to bring center y up by 0.5)November 11, 2022 at 6:58 pm #34096
Thanks so much prime, thats exactly what I needed. It was the constrain in XYZ bit that I was missing. My characters now walk up and down hills instead of through them!
Thanks a lotJanuary 27, 2023 at 5:00 pm #35331
Remember to set the character Rigidbody to Gravity, NOT Kinematic, along with the Constraints (under the RigidBody component) as already stated ( Freeze Position X, Z and Freeze Rotation X, Y, Z ). Be sure put that Capsule Collider on your person. If your AI is a box, you probably need the standard Box Collider.March 3, 2022 at 7:10 pm #36441
I had this happen to one of the squad command guys I added , somewhere along the line I had reassigned his mechanim controller to one for a mech I had in the scene. Reassigning it to the proper mechanim controller fixed it.
You must be logged in to reply to this topic.