News Forums RAIN General Discussion and Troubleshooting Character walks half way under ground

This topic contains 12 replies, has 6 voices, and was last updated by  bucketloader 1 year, 7 months ago.

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #33259

    dingding231
    Participant

    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.

    #33269

    prime
    Keymaster

    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 position

    #33438

    deal2014
    Participant

    Hi
    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?

    Thanks

    • This reply was modified 2 years ago by  deal2014.
    #33446

    prime
    Keymaster

    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.

    #33448

    dingding231
    Participant

    It still is broken for me too. It appears to be an issue with rigid bodies.

    #34000

    gamedevandy
    Participant

    Same here -the standard ‘Max’ character is walking into terrain and disappearing half way under when traversing waypoints. Im using Unity Free with Rain 2.1.5.0

    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!

    thanks
    A

    #34005

    prime
    Keymaster

    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.

    #34011

    gamedevandy
    Participant

    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 Thanks

    #34012

    gamedevandy
    Participant

    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 in

    #34082

    prime
    Keymaster

    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)

    #34096

    gamedevandy
    Participant

    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 lot

    #35331

    ARRCOMM
    Participant

    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.

    #36441

    bucketloader
    Participant

    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.

Viewing 13 posts - 1 through 13 (of 13 total)

You must be logged in to reply to this topic.