Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  I want to float an object
#8
(15-07-2021, 08:29 AM)josemendez Wrote: Density = mass/volume. mass is expressed in Kilograms, volume in cubic meters (m3). So density is expressed in Kg/m3.

To calculate the density of a rigidbody, you divide its mass by its volume. For 3D colliders, unity does not include any means to calculate its volume (though you can directly specify a density using Rigidbody.SetDensity). Fortunately most collider shapes (cubes, spheres, capsules) have very simple analytical formulas for volumes:
https://www.varsitytutors.com/hotmath/ho...rea-volume
I was wondering if there was an easy way to compare densities.
I should calculate it myself.

Thank you for your polite commentary.
It was very helpful!
Reply


Messages In This Thread
I want to float an object - by moyashiking - 13-07-2021, 08:09 AM
RE: I want to float an object - by josemendez - 13-07-2021, 10:42 AM
RE: I want to float an object - by moyashiking - 14-07-2021, 01:46 AM
RE: I want to float an object - by moyashiking - 14-07-2021, 06:29 AM
RE: I want to float an object - by josemendez - 14-07-2021, 09:35 AM
RE: I want to float an object - by moyashiking - 15-07-2021, 01:13 AM
RE: I want to float an object - by josemendez - 15-07-2021, 08:29 AM
RE: I want to float an object - by moyashiking - 15-07-2021, 08:54 AM