Sets the gravity vector for all sprites using physics.
class procedure SetGravity(const X: Single; const Y: Single); overload; static;
Parameters |
Description |
const X: Single |
The X component of the gravity vector. |
const Y: Single |
The Y component of the gravity vector. |
The X and Y values will be scaled into physics space so will only represent meters per second squared when scale = 1.0, in world space the values represent pixels per second squared. For example in the default scale of 0.2, a gravity value of 0,50 would represent 10 meters per second squared. Gravity is a constant acceleration applied to all physics objects equally, regardless of mass. Whereas a force applies an acceleration proportional to the objects mass. To counteract gravity with a force will require accounting for mass.
TAgkPhysics
Copyright (c) 2012. All rights reserved.
|