Search Unity

  1. Unity 2018.3 is now released.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Our response to Improbable’s blog post (and why you can keep working on your SpatialOS game). Read more here
    Dismiss Notice
  4. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  5. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice

Jelly cube

Discussion in 'Editor & General Support' started by Risine, Jan 11, 2019 at 6:57 PM.

  1. Risine

    Risine

    Joined:
    Dec 10, 2009
    Posts:
    128
    Hi everyone,

    I'd like to know how to make a jelly cube.
    From what I read here and there, the best way is to use bones on a cube, then attach them to some spring joint.
    But how can I do that?
    1/ Can I create bones in unity or do I have to use some other software like 3dsMax?
    2/ How do you attach a bone to a spring point/object?
     
  2. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    1,031
    Unless there's some Asset Store purchase you can make, I expect you'll need to go outside of Unity in order to rig up your model. The reason being, the bones need to be associated with vertices in your model, and I don't think you can set up blend weights in Unity.

    Blender's a good free choice to try out.Create a cube, add some bones, and start weight-painting to associate the bones to the different faces in your cube. Then export an FBX and bring that FBX into Unity.

    At that point, you can add a Rigidbody to each bone in Unity, and then create joints connecting the rigidbodies.

    Or maybe look at the project this guy made, and get some ideas:
     
  3. ERisine

    ERisine

    Joined:
    Mar 3, 2017
    Posts:
    4
    thanks for your reply dgoyette,
    I got the jelly cube test project, it works fine, thanks to that I don't have to learn blender ... for now :)

    Now I'm facing another problem, I'd like to make that jelly cube object a child of another basic object, to make the cube behave as any normal transform child, but with it's jelly properties(working in 'local' space).
    But it seems physics does not work that way. As soon as I do that, I've got my joints behaviing weirdly, doing strange stuff, like going all around.

    How can you "make physics relative to parent"?
     
  4. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    1,031
    I don't know if there's a simple solution. I definitely run into weird physics issues if I try to nest rigidbodies, or place an object's rigidbody on a parent and its collider on a child (or vice versa). So, it's possible the answer is that you just can't do that. Try to make sure your rigidbody and colliders are components of the same object, not separate by parent/child relationships.