jitterphysics icon indicating copy to clipboard operation
jitterphysics copied to clipboard

SingleBody.Constraints can't be added to the World

Open GoogleCodeExporter opened this issue 10 years ago • 2 comments

- What steps will reproduce the problem?

1. Just create a single body constraint,
2. call world.AddConstraint(..),
3. and get an instant NullReferenceException.

- What version of the product are you using?

The latest from the repository.

- Please provide any additional information below.

NullReferenceException: Object reference not set to an instance of an object
Jitter.Collision.IslandManager.AddConnection (IslandManager.cs:169)
Jitter.Collision.IslandManager.ConstraintCreated (IslandManager.cs:61)
Jitter.World.AddConstraint (World.cs:499)

IslandManager.AddConnection(RigidBody body1, RigidBody body2) doesn't expect 
body2 to be null.

Original issue reported on code.google.com by [email protected] on 24 Jun 2013 at 7:31

GoogleCodeExporter avatar Dec 03 '15 07:12 GoogleCodeExporter

Ok, I changed a bit both IslandManager.AddConnection and 
IslandManager.RemoveConnection to this - http://pastebin.com/bp2Cdf0E

It seems to work now.

Original comment by [email protected] on 24 Jun 2013 at 9:28

GoogleCodeExporter avatar Dec 03 '15 07:12 GoogleCodeExporter

Issue seems to be very old. Probably already fixed.

notgiven688 avatar Aug 08 '21 15:08 notgiven688