Skip to end of metadata
Go to start of metadata

Where Would I Need Bouyancy In My Game?

An aspect of the physics system that can provide large amounts of fun is the ability to have objects physically interact with water within your scene. This could be seen as a player that has a certain buoyancy value or is being pushed by a stream, to the times where you could have barrels or rocks running down into the water to float away. Understanding the most basic parameters is essential to getting interactions that are believable from the start.

Manipulating Buoyancy to Make Objects Float or Sink

Follow the steps below to see how buoyancy can be driven through a couple settings for various results:

  1. Go to Create Object -> Area -> Water Volume and then click several times to get the pattern of a square as shown below. Finally, double click to add your final 4th point.
  2. Assign a material to the entity by going to the properties panel, clicking on the Folder Icon and go to GameSDK -> Materials -> Water -> WaterVolumes. In here, select the water_cave material.
  3. To test the first object, drag in a RigidBodyEx Entity and change the object model to a primitive_cube in the object Model property. Uncheck Resting and set Mass to 1000. Keep in mind the Water settings below as we will adjust these in a later step. Once set you should see the cube resting nicely on the surface of the water.
  4. For the next step we will duplicate the RigidBody entity by pressing CTRL+D and then we will be changing the Water Density value to be 100, thus making the density value 1/10 and causing it to plummet below the surface.
  5. Finally we have a cube set to Water Density of 300 which allows the cube to tumble and bob up and down on the surface of the water. Keep in mind that anything below the value of 125 will cause the cube to sink below the surface immediately.

Step 1



Step 2



Step 3



Step 4



Step 5





  • No labels