June 2015
Beginner
354 pages
8h 23m
English
We will add two circles to the world by carrying out the following steps:
html5games.box2dcargame.js JavaScript file to add the wheel bodies.createWheel function which we will write to create a circular shaped body:// create two wheels in the world createWheel(25, 230); createWheel(75, 230);
createWheel function. We design this function to create a circle-shaped body in the given world at the given x and y coordinates in the world. To do this, put the following function in our JavaScript logic file:function createWheel(x, y) { var bodyDef = new b2BodyDef; var fixDef = new b2FixtureDef; bodyDef.type ...Read now
Unlock full access