Questions tagged [box2dweb]

Box2dWeb is port of box2dFlash port to javascript.

Box2dWeb is a physics engine and it's basically a port of Box2DFlash library to JavaScript.

95 questions
0
votes
1 answer

How to detect wether an Object came to sleep at a specific position?

I'm currently writing a small game with box2dweb and I need some direction for this: I'm throwing a Box or Ball and have to hit a specific place and trigger an event when the object that's been thrown isn't moving anymore, "fell asleep" so to say.…
nocksock
  • 5,369
  • 6
  • 38
  • 63
-1
votes
1 answer

Get X and Y coordinates from collision in Box2dweb (JavaScript)

When there is a collision in Box2dweb, this class create some objects. b2ContactListener.prototype.BeginContact From there I can access a lot of data with: var a = contact.GetFixtureA().GetUserData(); var b =…
Diego
  • 561
  • 1
  • 7
  • 18
-1
votes
1 answer

How to set gravity in the center box2d javascript

I need to set the gravity in a box2d world right in the center of the canvas. This means that objects will fall in the center of the canvas. The box2d framework is the javascript framework. Thank you.
Daniel Tranca
  • 1,374
  • 3
  • 13
  • 23
-1
votes
4 answers

Doubts on js scopes and external classes

I am new to oop in js. I'm working on a HTML5 game using Box2dWeb and I decided that I should it make it completely oop based. So I created a physics class like this in a separate file called physics.js (function(window) { function Physics(element,…
jaykumarark
  • 2,359
  • 6
  • 35
  • 53
-1
votes
1 answer

Execute code at every step in box2d

What would it be the way to execute code in each step (solve) of box2d instead of once per frame.
karacas
  • 2,054
  • 1
  • 19
  • 29
1 2 3 4 5 6
7