Phaser API Documentation

  Version: 
car(x, y, width, height, wheelSize)

Description:

Creates a composite with simple car setup of bodies and constraints.

Parameters:

name type description
x number

The horizontal position of the car in the world.

y number

The vertical position of the car in the world.

width number

The width of the car chasis.

height number

The height of the car chasis.

wheelSize number

The radius of the car wheels.

Returns:
Description:

A new composite car body.

Type:
  • MatterJS.CompositeType
Since: 3.0.0