Menu
IntroductionPhysics ObjectsForce EntitiesAdvanced UsageFurther Information
Bouyancy
Gyro 2.1a

Gyro_Object_SetBouyancy(entity object, float bouyancy)
Bouyancy affects the vertical velocity of objects when submerged in liquid. Most often, the object will be pushed upwards and either sink slowly downwards (bouyancy < mass) or rise to the surface (bouyancy > mass) of the liquid. Negative bouyancy reverses this and will accelerate the descent of the object. Final bouyancy strength for air, water, slime and lava is multiplied by the GYRO_BOUYANCYMOD_*** globals, as found here.

Gyro_Object_SetBouyancyMod(entity object, float bouyancy, float air, float water, float slime, float lava)
An extended version of the above, this function allows you to set the environment multipliers on a per-object basis, rather than using the default GYRO_BOUYANCYMOD_*** values.

Gyro_Object_RemoveBouyancy(entity object)
Removes all bouyancy settings from the specified object.