C4 Engine
C4 Engine API Documentation

class GravityForce

Defined in:  C4Forces.h
The GravityForce class exerts a gravity force on rigid bodies inside a field.
Definition

class GravityForce : public Force

Constructor

GravityForce();

Description
The GravityForce class represents a gravity force that produces acceleration inside a field. When a rigid body intersects a field to which a GravityForce object is assigned, the gravity force is applied to the rigid body in addition to the global gravity force set for the physics controller.

The gravity force is always directed downward in the direction of the negative z axis of the field to which it is assigned.

For each rigid body, the gravity force experienced in a field is affected by the rigid body's gravity multiplier.
Base Classes
Force A gravity force is a specific type of force.
See Also

PhysicsController::GetGravityAcceleration

PhysicsController::SetGravityAcceleration

BodyController::GetGravityMultiplier

BodyController::SetGravityMultiplier