Menu
IntroductionPhysics ObjectsForce EntitiesAdvanced UsageFurther Information
Point Affector
Gyro 2.1a

Gyro_Force_ApplyAffector_Point(entity force, vector offset, vector axis, float strength, float absolute)
The point affector pushes objects from the force origin, adjusted by the offset vector, much like an explosion or shockwave. The axis multiplication vector is present and simply scales the strength of the push on each axis. Giving the affector either negative strength or negative axis scaling will cause the force to suck objects into it's centre, rather than push them away. The absolute flag should be set to either TRUE or FALSE (1 or 0) to declare the strength as either absolute or relative to object mass.

Gyro_Force_ApplyAffector_PointMod(entity force, vector offset, vector axis, float strength, float absolute, vector modx, vector mody, vector modz)
This affector is an extended version of the above that accepts a further three vector inputs that are used to transform the push direction. In essence, a simple matrix multiplication is performed on the push vector that can produce several effects, including perpendicular motion. Axis multiplication is performed as normal, but before the push direction is transformed. For an example of how the pointmod affector may be used, please look at the whirlwind force macro in gyro_user.qc.

Gyro_Force_ApplyAffector_Sphere(entity force, float strength, float absolute)
A simplified version of the point affector, the sphere affector drops the axis modulation and origin offset vectors for the sake of convenience. Ideally used for explosions or other common radial forces. The absolute flag, as always, should be either TRUE or FALSE.