Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EdgeShapes are not fully implemented #31

Open
GoogleCodeExporter opened this issue Aug 24, 2015 · 6 comments
Open

EdgeShapes are not fully implemented #31

GoogleCodeExporter opened this issue Aug 24, 2015 · 6 comments

Comments

@GoogleCodeExporter
Copy link

When you try to use b2EdgeShapes one suddenly run into problems, because 
several parts are not yet fully implemented.

To get the shapes working I attached a preliminary patch (edge shapes can be 
created at least).

However, since the b2DistanceProxy.prototype.Set is yet not implemented for 
EdgeShapes, any collisions will result in an error.

Original issue reported on code.google.com by CWBudde on 24 Jul 2012 at 12:22

@GoogleCodeExporter
Copy link
Author

Just fixed the patch (see attached)

Original comment by CWBudde on 24 Jul 2012 at 12:30

Attachments:

@GoogleCodeExporter
Copy link
Author

Improved the patch, still not fully working, but at least no more hidden errors 
anymore.

Original comment by CWBudde on 24 Jul 2012 at 1:26

Attachments:

@GoogleCodeExporter
Copy link
Author

I'm learning box2dweb & box2d(apologies for my ignorance) an I'd like to create 
'walls' around my game's boundaries.  One recommendation I read  was to use a 
body that contained EdgeShapes that surround the perimeter of my game. However, 
this doesn't work and I'm assuming it's due to this issue.  So it'd be great to 
see this fixed.

In the meantime, does anyone know of a work-around? Can I simply make a create 
a large box shape that contains my objects?  I'm assuming something like 
creating game boundaries is a common task and I'm probably just going about it 
the wrong way.

Original comment by jim.de...@gmail.com on 26 May 2013 at 10:30

@GoogleCodeExporter
Copy link
Author

The current work-around seems to be to create a b2PolygonShape and use its 
SetAsEdge method, like so:

fixDef.shape = new b2PolygonShape()
fixDef.shape.SetAsEdge(new b2Vec2(x1, y1), new b2Vec2(x2, y2))

Original comment by iancbosw...@gmail.com on 6 Jun 2013 at 2:17

@GoogleCodeExporter
Copy link
Author

Many thanks, Ian. Seems so simple I'm a bit embarrassed I didn't think to try 
it :-)

Original comment by jim.de...@gmail.com on 9 Jun 2013 at 9:20

@GoogleCodeExporter
Copy link
Author

Any improvements yet?

Original comment by jonasvol...@gmail.com on 11 Nov 2013 at 5:18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant