Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Question Ragdolls moving on the ground consistently

Discussion in 'Physics' started by Mohx-games, Jan 1, 2024.

  1. Mohx-games

    Mohx-games

    Joined:
    Feb 17, 2020
    Posts:
    8
    Hey Unity Forums,

    Been experimenting with ragdolls recently, Active Ragdolls more specifically. I have tried a lot of approaches, but overall none have worked how I really want to.

    All I want to do is allow a ragdoll to walk on the ground realistically. I have tried a purely IK approach using Unity's built-in system, and while the IK works, I can't figure out how to get any force behind the feet to move it forward.

    I switched to an animation style approach; copying animations from one model to another using the local rotation of the animated model to the target joints of the ragdoll. This works great in terms of looks, the only issue is getting it to move consistently.

    With the current setup, the feet will occasionally get stuck on the ground and slow the character down, also desyncing the animation slightly leading to more errors in the future. He also occasionally bounces off the ground and won't stay grounded, but even if he does, it makes him more prone to his feet getting stuck.


    What are some other approaches I maybe haven't thought of? All I need at this point is for the feet to consistently hit the ground flat and not get stuck and prevent the character from bouncing in the air when his feet collide at a weird angle.

    The animations have Foot IK set to 'enabled', and that tries to keep them flat usually, but doesn't account for the animation getting off-cycle due to the collision mentioned above.

    Anything is appreciated, thank you for the help!

    (Here is a picture of the feet for reference, if this helps)
    upload_2024-1-1_16-22-31.png
     
  2. koirat

    koirat

    Joined:
    Jul 7, 2012
    Posts:
    2,095
    Active Ragdoll is extremely difficult.
    Have you seen it done right in any game ?

    If I were you I would give up on it.