Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Feature Request Joint Configuration for a "weird" Active Ragdoll character

Discussion in 'Physics' started by Padrox_, Jun 28, 2023.

  1. Padrox_

    Padrox_

    Joined:
    Jun 12, 2021
    Posts:
    15
    Hey,

    I'm sorry for this weird post but I'm in trouble with my Character.
    What I'm trying to achieve is really specific.
    Here is my character concept:
    upload_2023-6-28_16-19-39.png
    Character Behavior:
    - The player can control the ball to make it roll in the different direction like a normal sphere without any constraints.
    - The black base must follow the ball without applying any forces / mass to the ball.
    - I've added blue arrows to show how the base should react. I want it to be simulated by physics sticking around the ball, floating at a certain height. For example if you roll on the left the base will tend to be at the right of the sphere like you normally suppose it should rotate around but ALWAYS be somehow flat "not more than approximately (-)35 degrees.
    - The body should be simulated by Physics being an Active Ragdoll trying to keep its position but flying around based on the base and ball speed.

    This is a simple drawing to illustrate how the base should react if the ball is rolling towards the right.
    upload_2023-6-28_16-43-22.png

    The whole controller should feel funny inspired by Human Fall and Fall Guys. At a later stage of development I'm going to turn my game to a third person camera so the base will at this point face towards where the player is looking and the ball should roll based on the camera position.

    I first though of using Joints but I decided to check for a simple script to make it stick around but it's a bit messed up by the forces apply now and then so I though of brining down a notch and ask you guys on the forum.

    If you need any more information, feel free to ask,
    Thank you in advance,
    Padrox
     
  2. KillDashNine

    KillDashNine

    Joined:
    Apr 19, 2020
    Posts:
    453
    I don't think this forum is for getting free designs for your game but for getting technical advice to specific technical problems. That thingy you drew up can be implemented in many ways, and you need to do it yourself.
     
  3. Padrox_

    Padrox_

    Joined:
    Jun 12, 2021
    Posts:
    15
    I’m not asking for specific designs, my bad if it’s what you’ve thought. I tried different ways of making it but whatever I tried between joints / custom physics script couldn’t help me to achieve what I’m looking for.

    I created this forum to know what technical tools, if I can call them like that, they would use because I’m stuck.

    i hope you can help me
     
  4. KillDashNine

    KillDashNine

    Joined:
    Apr 19, 2020
    Posts:
    453
    Well, first implement your rolling ball, then take it from there. This part is not trivial. Your ragdoll can be easily jointed to whatever you want, just make an empty kinematic rigidbody transform and float it in the air at your ball mass center, for example. ConfigurableJoint with linear locks and angular limits.