How to do animation to create a bear bottle

Hi iam new to unity… here i wanna create one bear bottle(with inside bear) and one glass. now if i click the play button then the bottle should rotate and bear should fall into the glass… may i know which topics (i think its animated related things) i should learn before start this

Hi Manikanta,

To fill a beer bottle using Unity you will need a couple of assets and some knowledge over animation.

Let’s chop your scene into a few smaller, easy to understand parts.

You need the following:

  1. A 3D model of an empty beer bottle.
  2. An animation clip of the bottle rotating or a simple script.
  3. An animation clip of a liquid pouring into the bottle.
  4. A 3D model of liquid as it sits in the beer bottle.
  5. An animation clip of the liquid filling from bottom to top.

What to do?

  1. Send me your e-mail, I made a bottle model for you already and I can send it to you. This forum doesn’t let me attach .blend files here. Alternatively you can look online for a free bottle model.
  2. Now, you should check this tutorial to see how you can rotate objects here. this way you can rotate your bottle through a simple script. Alternatively this is also possible through animation.
  3. For the pouring liquid you need to decide how the liquid should pour first? There are multiple ways, however, I’ll go with an easier idea for you. We should simply have a cylinder that starts from above the camera and extends into the bottom of the bottle. We can turn this model on when we’re pouring and off when the pouring is finished.
  4. As the liquid pours you’d like to see the bottle fill. We need a simple cylinder that will fit the inside of the bottle. This could be either a 3D model of a simple cylinder or the negative space inside the bottle as a model.
  5. A simple approach to letting the bottle fill with this liquid is letting the model start with a scale of Y in 0. So imagine the model is completely squashed vertically. then we shrink the Y from 0 to 1 as if the liquid was filling from bottom to top.

I would start learning more about animations here in case you want to apply a solution that’s more accurate in terms of the activities the models will execute.

Hope this gets you looking in the right direction. Best of luck!

Here’s an example image of the models: