Menu
IntroductionPhysics ObjectsForce EntitiesAdvanced UsageFurther Information
Motion Resistance
Gyro 2.1a

Gyro_Object_SetResistance(entity object, float resist)
Motion resistance will scale the velocity and angle velocity of an object every Gyro iteration. This will commonly be used to slow objects down as they experience the resistive forces associated with motion, such as air and water resistance. Negative resist values, however, will accelerate objects. The strength of the resistance is relative to the object's mass and further scaled by the GYRO_RESISTANCEMOD_*** constants, as shown here, before being applied to the object.

Gyro_Object_SetResistanceMod(entity object, float resist, float air, float water, float slime, float lava)
This is an extended version of the above function. It accepts four extra arguments to control the resistance multipliers on a per-object basis rather than falling back to the default GYRO_RESISTANCEMOD_*** constants.

Gyro_Object_RemoveResistance(entity object)
Removes all resistance from a given object.