MCPcopy
hub / github.com/phaserjs/phaser / setGravity

Method setGravity

types/phaser.d.ts:111281–111281  ·  view source on GitHub ↗

* Sets the body gravity for both the X and Y axes. This is an acceleration applied to * this body in addition to the world gravity, in pixels per second squared. Values can * be positive or negative. Larger absolute values result in a stronger effect.

(x: number, y?: number)

Source from the content-addressed store, hash-verified

111279 * @returns This Game Object.
111280 */
111281 setGravity(x: number, y?: number): this;
111282 /**
111283 * Sets the body gravity applied to the X-axis. This is an acceleration in addition to
111284 * the world gravity, in pixels per second squared. Use a positive value to pull the body

Callers 3

World.jsFile · 0.80
Body.test.jsFile · 0.80
Gravity.test.jsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected