MCPcopy Index your code
hub / github.com/phaserjs/phaser / setVelocity

Method setVelocity

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

* Sets the velocity of the Body. * @param x The horizontal velocity of the body, in pixels per second. Positive values move the body to the right, while negative values move it to the left. * @param y The vertical velocity of the body, in pixels per second.

(x: number, y?: number)

Source from the content-addressed store, hash-verified

111437 * @returns This Game Object.
111438 */
111439 setVelocity(x: number, y?: number): this;
111440 /**
111441 * Sets the horizontal component of the body's velocity.
111442 *

Callers 9

MatterPhysics.jsFile · 0.80
Velocity.jsFile · 0.80
Body.jsFile · 0.80
Body.jsFile · 0.80
Velocity.jsFile · 0.80
createMethod · 0.80
createMethod · 0.80
Body.test.jsFile · 0.80
Velocity.test.jsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected