Home
News
Learn
Download
Examples
Community
Plugins
Phaser API Documentation
Version:
Namespaces
Classes
Events
Game Objects
Physics
Scenes
Changelog
Member of:
Phaser.Physics.Matter.Sprite
setVelocityX(x)
Description:
Sets the horizontal velocity of the physics body.
Parameters:
name
type
description
x
number
The horizontal velocity value.
Returns:
Description:
This Game Object.
Type:
Phaser.GameObjects.GameObject
Inherited from:
Phaser.Physics.Matter.Components.Velocity#setVelocityX
Since:
3.0.0
Source:
src/physics/matter-js/components/Velocity.js
(Line
35
)
Possible examples