Menu
IntroductionPhysics ObjectsForce EntitiesAdvanced UsageFurther Information
Physics Objects
Gyro 2.1a

Gyro is broken down into two main systems - objects and forces. The object system is what actually moves and controls your entities, and includes subsystems like bouyancy, turbulence and thrust. The force system does not directly affect entities - it only passes information to the object system, which then applies the motion itself. To this end, every entity that you want Gyro to work with must first be set as a physics object, using the following functions:

Gyro_Object_Activate(entity object, float mass)
Informs Gyro that the specified entity is an active physics object, and is to be considered in every physics interaction. Mass is defined in arbitrary units, left to your choice - grams, kilograms or pounds, for example - but should be consistent throughout your mod. It will be used in nearly all calculations once set, and cannot be changed without first clearing all physical properties from the entity. If the object has been previously deactivated, this function will reactivate it and ignore the discard the new mass.

Gyro_Object_Deactivate(entity object)
Deactivates a physics object without removing physical properties. The entity will become invisible to Gyro, but can be reactivated, all properties intact, with the function above. You do not need to deactivate or clear the physics of an object before you call remove() on it.

Gyro_Object_ClearPhysics(entity object)
Strips all of physics settings from an entity, making it invisible to Gyro. The entity can be activated again with completely new properties.

Once an entity has been declared as a physics object, it can be controlled by the following subsystems:

Aerodynamics
Angular turbulence
Bouyancy
Hovering
Motion resistance
Thrust
Turbulence