Hello

Please answer a few questions.

Task: it is necessary to make a ball, such that if a metal object is dropped on it, then the ball under the action of gravity will be somewhat deformed and retain its deformation. The action takes place in Unity.

I understand that Unity itself is able to create only metal objects (or to make metal imported models), and as much as I can get closer to the goal to pick it up (or create) some collider material, but as you understand it, I don’t like it but the ball did not sag.

The questions are as follows:

Is it possible to do this only with Unity? If so, through which component? Or through the script? If the script, then which way to goof?

If only through Unity fails, what should I do? Create a model in a 3D editor? What to consider?

Such deformations are done through animation, or through the native properties of the object?

Thank you in advance.

  • It is possible, but difficult. I looked superficially, in principle, you can google in the direction of the unity deformation mesh and find something like this or google in the direction of working with a mesh at the level of the unity procedural mesh code, but this is an extremely complicated level. - Alex Krass

1 answer 1

What you want to get is not controlled by the material of the collider for the model. The collider material is responsible for how it will interact with other colliders.

Your question is in the area of ​​changing the vertices of the mesh. I can advise you to read three articles on Habré, dedicated to this, just be able to more fully understand the essence of the issue.

Part 1 - Generating a mesh using a height map
Part 2 - Deformation of the mesh with a height map
Part 3 - Collision Based Deformation of the Mesh