ArgumentOutOfRangeException for space.Update(gameTime)

Discuss any questions about BEPUphysics or problems encountered.
Post Reply
L4nt0m
Posts: 1
Joined: Fri May 01, 2009 6:38 pm

ArgumentOutOfRangeException for space.Update(gameTime)

Post by L4nt0m »

Hello,
I'm trying to get the bepu physics running, but I'm facing a rather weird problem: I've got a simple test set up, where there hasn't even been added a single entity to the Space. The space is simply initialized with

Code: Select all

space = new Space();
Further, no changes have been made to the space object. Then, when I call the space.Update() function it gives an ArgumentOutOfRangeException. I've also tried just passing a new GameTime() object as argument or a float-value, but all give the same exception.
Does anybody know what I could be doing wrong here?

Thanks in advance!

(btw: I'm using the latest version of bepu-physics)
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: ArgumentOutOfRangeException for space.Update(gameTime)

Post by Norbo »

This is most likely a bug with the DynamicBinaryHierarchy broadphase. It attempts to grab the first entity out of a list under the assumption that there's an entity there, but this of course will fail if no entities are present. It's fixed in the upcoming version; until then, you can add a few entities to your space before calling update or use the PersistentUniformGrid broadphase instead.
Post Reply