C# Port: Physics2D.Net

Discuss issues specific to the C#/XNA ports of Box2D
Posts: 1
Joined: Sat Jan 19, 2008 9:56 pm

C# Port: Physics2D.Net

Postby Jono.Porter » Sat Jan 19, 2008 10:01 pm

Hi, I’ve been trying to port the most recent code of Box2D over to my Physics2D.Net Engine and I am having some problems.

I have basically ported the b2ContactSolver class and kept the rest of my code the same. (I’m starting small)

The first problem I have come across is how I represent immovable platforms. I currently set the Body’s Mass to Positive Infinity and has worked until now. The problem is with the b2ContactSolver::SolvePositionConstraints method. It does some math that results with NAN being added to the Body’s position. Naturally this is not a desired behavior. I have tried to do some changes but they either result with bodies slowly sinking into the immovable platforms or them jumping around like popcorn.

Basically I’m wondering if someone could give a few pointers on how to resolve this problem. Also how does Box2D represent immovable platforms?

Erin Catto
Site Admin
Posts: 2948
Joined: Thu Sep 06, 2007 12:34 am

Re: C# Port: Physics2D.Net

Postby Erin Catto » Sat Jan 19, 2008 10:59 pm

For static bodies the mass and inverse mass should be zero. Same for the rotational inertia.

Let us know when you finish the C# port. I don't think one exists yet. Thanks!

Posts: 6
Joined: Fri Mar 27, 2009 10:03 am

Re: C# Port: Physics2D.Net

Postby Laban » Tue Mar 31, 2009 7:53 am

Maybe this is a stupid question, but to me it looks like there is no "joint" with a "torque" property. Any comment, please?

Posts: 40
Joined: Mon Sep 17, 2007 4:30 am
Location: appleton, wi

Re: C# Port: Physics2D.Net

Postby JeffWeber » Fri Apr 03, 2009 10:36 am

I believe this c# port of box2d is dead. Box2DX is the one you want... I noticed you've already seen the other thread.

Posts: 3
Joined: Fri Dec 24, 2010 9:05 am

Re: C# Port: Physics2D.Net

Postby RogerBlake » Fri Dec 24, 2010 9:29 am

Physics2D.Net is 2 dimensional unbending corpse physics engine printed in C#. And well Box2DX is a C# port of Box2D - Erin Catto's 2D Physics Engine.
To effort with XNA, Silver light and .Net. It is an absolute redraft of my unique physics 2D found on source fake. It is CLS acquiescent. At present it has only one crash solver. The narrow phase smash detector is measured to be part of the solver. The Solver is chronological impulses with a coldness grid used for thin phase detection. There are 4 Broad phase detectors to choose from.
hp coupon codes

Posts: 236
Joined: Mon Jul 27, 2009 6:46 am

Re: C# Port: Physics2D.Net

Postby Paril » Sat Dec 25, 2010 5:17 pm

Also, the one I'm working on, Box2CS, which is a frontend to Box2C, and runs at native C speed.


Posts: 1
Joined: Mon Apr 25, 2011 5:09 am

Re: C# Port: Physics2D.Net

Postby Anthony00814 » Mon Apr 25, 2011 5:12 am

It is an complete abstract of my different physics 2D begin on antecedent fake. It is CLS acquiescent. At present it has alone one blast solver. The attenuated appearance accident detector is abstinent to be allotment of the solver.

Return to “C Sharp”

Who is online

Users browsing this forum: No registered users and 1 guest