make an object elastic and flexible

hi there;
I have a question if i wanna make an object, like sphere, elastic what I should do? actually in my program I have a robot which is moving around and in its environment there is an obstacle (sphere).I want to make this sphere elastic in a way, as robot reach to that this sphere acts like a elastic object.
Any help would be appreciate so much.

You either have to implement the deformation on your own or use a physics library like Bullet Physics that supports soft bodies.

First cut is to simply scale the sphere by different amounts in each direction. If that’s not good enough, you’re going to have to get fancy.