0
votes
0answers
5 views

box2dweb issue in DestroyJoint function

my jsfiddle : http://jsfiddle.net/H8e9m/9/ as you can see when the ball reach the pendulum end and collide with it by a revolute joint, the problem occurred when trying to make the ball release the ...
0
votes
1answer
31 views

SVG—Adding fire to the roket

as you might expect, I have got a game in development, including a main character—fortunately… This character is on the one hand represented by a bunch of Box2D bodies and on the other hand, ...
0
votes
1answer
33 views

Box2D: Adjusting character position for side-scrolling

In my side-scroller I would like to give the illusion of the character walking forward while his sprite is actually being held in place. If he walks near the edge of the screen, I would like to adjust ...
1
vote
3answers
69 views

Box2dWeb: setting velocity of bodies using events

I would like to move a kinematic box by pressing the down arrow. As is noted by the console logs, the keydown actually does change the box's velocity... but for reasons beyond my grasp it still ...
0
votes
0answers
105 views

Impact js Multibody entities with animations

I have a simple impactjs project working with box2d. just a "car" that can run over some rough terrain. I would like to have the wheels spin though. I know I could accomplish this with a sprite sheet ...
2
votes
1answer
266 views

Box2D: Asteroids-Like Spaceship Physics

I'm new to Box2D (JavaScript) (and the world of physics/mathematics) so I'm having a hard time working out the methods I need to use to make a spaceship act like it does in the classic arcade game ...
0
votes
2answers
338 views

Increasing speed of circle over time as linear with Box2d

Assume that there is a circle and it can be moved by using keyboard arrows.Is required that increasing speed over time like increasing car speed. For example; max speed is 25 and time to reach max ...
5
votes
1answer
492 views

box2d with lines

I have a very simple platform game builder and I've specified the ceilings, walls and floor as line segments. A line has a winding, or normal; you can determine the direction that a line should be ...
0
votes
1answer
102 views

Questions for QueryAABB

I'm currently having trouble getting my head around QueryAABB, and hope to find some answers here. The LowerBound of an AABB the upper-left corner (and vice versa). Why is that and what idea is ...
4
votes
1answer
105 views

How to detect whether 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 and have to hit a specific place and trigger an event when the object that's been thrown isn't ...
0
votes
1answer
126 views

Basic Use of ApplyImpulse

I am trying to apply a force to a bunch of b2_dynamicBodys, but it seems to only work for a random number of items and then stops with an error. //create some items to move bodyDef.type = ...
-1
votes
1answer
468 views

Attach my sprite with Box2d [closed]

I'm coding Javascript(HTML5) with Box2D. And I want to ask how to attach Sprite with Box2D. This is function My sprite: function My_Sprite() { this.m_Image = new Image(); this.m_Position = ...
2
votes
1answer
1k views

Specifying force and angle in ApplyImpulse in box2d

I need to apply an impulse on a object with a particular force and at a particular angle in Box2d. If I am right the syntax would be the following: body.GetBody().ApplyImpulse(new ...
3
votes
3answers
458 views

Semi Fixed-timestep ported to javascript

In Gaffer's "Fix Your Timestep!" article, the author explains how to free your physics' loop from the paint one. Here is the final code, written in C: double t = 0.0; const double dt = 0.01; double ...
-1
votes
1answer
147 views

Interacting with box2D objects

How can I interact with an object in box2d, I'm completely new to this so I have no clue what to do. The box is created like this: bodyDef.type = b2Body.b2_dynamicBody; fixDef.shape = new ...
4
votes
2answers
4k views

Box2dWeb and Images

How do I import and attach a PNG or GIF to a shape in Box2dWeb? The best resource I could find online is at: http://www.jeremyhubble.com/box2d.html However, this "tutorial" doesn't give much ...
6
votes
2answers
876 views

Scrolling Box2D DebugDraw

I'm developing a game using Box2D (javascript implementation - Box2DWeb), and I would like to know how I can pan the debug draw. I know the usual answer is - don't use debug draw, it's just for ...
15
votes
6answers
5k views

Are there any alternative JS ports of Box2D?

I have been thinking about creating a top down 2D car game for HTML5. For my first game I wrote the physics and collisions my self but for this one I would like to use some ready made library. I ...