Box2D Forums

It is currently Sat May 25, 2013 2:39 pm

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 19 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: 2.1 Manual Errata
PostPosted: Mon Jul 19, 2010 2:30 pm 
Offline

Joined: Thu Apr 01, 2010 1:42 pm
Posts: 72
Under 8.7 Prismatic Joints :

Quote:
jointDef.motorForce = 1.0f;


instead of
Quote:
jointDef.maxMotorForce = 1.0f;


;)


Top
 Profile  
 
 Post subject: Re: 2.1 Manual Errata
PostPosted: Wed Jul 28, 2010 4:16 am 
Offline

Joined: Wed Jul 28, 2010 3:35 am
Posts: 2
4.3 Circle Shapes

b2CircleShape circle;
circle.m_p.Set(1.0f, 2.0f, 3.0f); // b2Vec3 used instead of b2Vec2
circle.m_radius = 0.5f;

On manual m_p is b2Vec2 but b2Vec3 is documented.
circle.m_p.Set( 1.0f, 2.0f, 3.0f ) ;


I have just started learning box2d from yesterday and found mostly older version ( Box2d 2.0 ) articles on web. But i learned 2.1 has good features so i am keeping it up.

Thank you for such a nice physics package.
;^)


Top
 Profile  
 
 Post subject: Re: 2.1 Manual Errata
PostPosted: Fri Aug 06, 2010 2:36 pm 
Offline

Joined: Mon May 17, 2010 8:26 am
Posts: 13
Location: France
manual.pdf Box2D 2.1.2, page 44, 9.4 Contact Filtering

Code:
class MyContactListener : public b2ContactListener
{
public:
void BeginContact(b2Contact* contact)
{ // handle begin event }
void EndContact(b2Contact* contact)
{ // handle end event }
void PreSolve(b2Contact* contact, const b2Manifold* oldManifold)
{ // handle pre-solve event }
void PostSolve(b2Contact* contact, const b2ContactImpulse* impulse)
{ // handle post-solve event }
};


Should be

Code:
class MyContactListener : public b2ContactListener
{
public:
void BeginContact(b2Contact* contact)
{ /* handle begin event */ }
void EndContact(b2Contact* contact)
{ /* handle end event */ }
void PreSolve(b2Contact* contact, const b2Manifold* oldManifold)
{ /* handle pre-solve event */ }
void PostSolve(b2Contact* contact, const b2ContactImpulse* impulse)
{ /* handle post-solve event */ }
};


:geek:


Top
 Profile  
 
 Post subject: Re: 2.1 Manual Errata
PostPosted: Sat Feb 05, 2011 9:04 pm 
Offline

Joined: Sat Feb 05, 2011 8:51 pm
Posts: 30
In chapter 10, Ray Casts section:
Quote:
You can use ray casts to do line-of-site checks
Should be "line-of-sight".


Top
 Profile  
 
 Post subject: Re: 2.1 Manual Errata
PostPosted: Wed Feb 16, 2011 4:42 am 
Offline

Joined: Wed Jul 28, 2010 3:35 am
Posts: 2
6.2 Fixture Creation

Section: Density
Line: The mass of a body is automatically adjusted when you ......

Nothing after you word. The statement is incomplete.


Top
 Profile  
 
 Post subject: Re: 2.1 Manual Errata
PostPosted: Mon Feb 21, 2011 10:40 am 
Offline

Joined: Mon Feb 21, 2011 10:28 am
Posts: 1
There is an issue with the example of a revolute joint's lifetime on page 34.

Chapter 8.3 Joint Factory

Here's an example of the lifetime of a revolute joint:
Code:
b2RevoluteJointDef jointDef;
jointDef.body1 = myBody1;
jointDef.body2 = myBody2;
jointDef.anchorPoint = myBody1->GetCenterPosition();
b2RevoluteJoint* joint = myWorld->CreateJoint(&jointDef);
... do stuff ...
myWorld->DestroyJoint(joint);
joint = NULL;



It took a rather long time to find the answer to this problem, but it would appear that joints cannot be created in this manner.
Instead they must be created like this.

b2RevoluteJoint* joint = (b2RevoluteJoint*)myWorld->CreateJoint(&jointDef);


Top
 Profile  
 
 Post subject: Re: 2.1 Manual Errata
PostPosted: Fri Mar 04, 2011 10:01 pm 
Offline

Joined: Sat Feb 05, 2011 8:51 pm
Posts: 30
In the API documentation for b2World::GetContactList() (API/classb2_world.html):
Quote:
Warning:
contacts are
...are what?


Top
 Profile  
 
 Post subject: Re: 2.1 Manual Errata
PostPosted: Wed May 11, 2011 5:24 pm 
Offline

Joined: Tue Sep 25, 2007 2:22 pm
Posts: 483
Code:
jointDef.body1 = myBody1;
jointDef.body2 = myBody2;


In the manual, under gear joints, I see this code, but the constructor makes assumptions about the bodies on the joints from the b2GearJointDef and does not use the bodies from b2JointDef.


Top
 Profile  
 
 Post subject: Re: 2.1 Manual Errata
PostPosted: Sun Aug 28, 2011 3:39 pm 
Offline
Site Admin

Joined: Thu Sep 06, 2007 12:34 am
Posts: 2931
Thanks all. I have incorporated your feedback. I'll start a new thread once 2.2 is out.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 19 posts ]  Go to page Previous  1, 2

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group