How to create an elastic (movable) object?

Hi

I would like to create an object (par example one sphere) with an elastic (movable) tile. Is it possible to create the elastic tile using unity 3d.

Regards

I’m not sure exactly what you’re asking here. Are you looking for physical elasticity in game objects? And do you mean tile in the sense of a square piece of some sort, or… How would that work with a sphere?

Could you go into a bit more detail?

Here is a drawing. The tile has to move randomly in 3D space. Therefore I think that it has to be elastic.

2966583--220262--Pic_movableObj.jpg

The tile has to be a 3D cylindrical object.

Do you want your cylinder to actually deform (change shape)? Or do you want it to move and bounce off of things, like a a tennis ball? Or something else?

(I looked at your picture, but I’m afraid I still don’t understand what you want.)

1 Like

The cylinder has to change the shape.

OK, then you will need to grab the Mesh from the MeshFilter component, and adjust the positions of the vertices. The code sample there (under Mesh.vertices) is a pretty good one to get you started.

However, this is not really a beginner-level topic — it’s intermediate to advanced, I would say. If you’re still new to Unity, I would advise you to put this feature aside for now, and come back to it later.

2 Likes

This is one valid approach. An alternative approach would be to use a skinned mesh.

However you still need to get the underlying deformations. I would approach this by using a bunch of strategically placed GameObjects connected with Rigidbodies and SpringJoints. This is essentially the approach I took in Pond Wars. It’s a realatively simple hack on top of the existing physics system.

I will reecho @JoeStrout 's point. This is not beginner level stuff. You need to be super familiar with how the engine works first before attempting this.

1 Like