Page 1 of 1

Odd behavior in box-box collisions in development version

Posted: Tue Aug 23, 2011 11:07 pm
by Alic
Hey Norbo, you seem to have completely fixed that deactivation issue I was seeing. Haven't seen it since I tried the development version. Thanks :)
There's been one odd thing that I've noticed since I upgraded from the 0.16.2 main release, and I thought I'd warn you about it in case you weren't aware. It can be most easily seen when moving a box around another box by sliding diagonally into it.

Imagine two boxes next to each other from a top down view. Both boxes have LocalInertiaTensorInverse = new Matrix3X3(). The box on the right is dynamic. The box on the left is kinematic. They both sit on a large kinematic floor, as in many of the demos.

If you apply a northwesterly force to the box on the right, so that it collides with the box on its left, it then starts slowly sliding northwards while pressing against the other box. As it should. The weird thing happens when the box on the right clears the box on the left -- you would expect it to start moving left. Instead, it seems to think it's still colliding with the box on its left for a fixed amount of time. So, in extreme cases, the dynamic box could be a whole box length north of the kinematic box before it finally starts moving left.

I've considered the possibility that this could be the StaticFriction of the floor keeping the moving box from establishing westward movement. But it really doesn't seem to be the case -- for a set amount of time (probably a bit less than a second, but more than half a second) the moving box literally doesn't move a single pixel to the left (or... west, I guess I should say). It really looks like the kinematic box invisibly extends northwards. But it doesn't -- you can produce the exact same behavior while moving into (and around) any side of the kinematic box.

Might this be a bug that's crept in, or do I just need to tweak some properties of the boxes, most of which are still set up as they were for 0.16.2?

Alex


*edit* By the way, I'm running my simulation at 60 updates per second , and using the most recent development version at the time of this post.

Re: Odd behavior in box-box collisions in development versio

Posted: Wed Aug 24, 2011 12:05 am
by Norbo
Nothing that I know have has changed specifically with box-box between v0.16.2 and the development version. I cannot seem to reproduce the described behavior either.

It doesn't sound like anything to do with friction. Complete stopping is usually something to do with contacts, but I don't observe any problems with the box-box collision detection case.

A reproduction case or just a code snippet (since it seems to be a fairly isolatable and reproducible issue) would be helpful.

Re: Odd behavior in box-box collisions in development versio

Posted: Wed Aug 24, 2011 12:10 am
by Norbo
Also, you could draw the contacts to get a better idea of what is catching (if contacts are at fault). The ContactDrawer in the BEPUphysicsDemos drawer could be used.

Re: Odd behavior in box-box collisions in development versio

Posted: Wed Aug 24, 2011 3:35 am
by Alic
Ok, I'll work on a reproduction case. Need to try pulling a few bits out of my ever-expanding game engine, anyway. Probably won't have it till tomorrow, maybe Thursday. Thanks for the responses,


Alex

Re: Odd behavior in box-box collisions in development versio

Posted: Tue Aug 30, 2011 7:52 am
by Norbo
The latest development version includes some changes that may address what you saw. I didn't reproduce the exact behavior, but I did find some things which could conceivably explain it while working on other areas of the engine.

Re: Odd behavior in box-box collisions in development versio

Posted: Wed Aug 31, 2011 3:29 am
by Alic
Ok, I'll try the new version and tell you what happens. Sorry I didn't post that reproduction case between then and now -- the whole past week has been a blur of meetings/paperwork over a job I just got.

Re: Odd behavior in box-box collisions in development versio

Posted: Wed Aug 31, 2011 3:40 am
by Alic
Yep, you fixed it completely. Case closed.

Thanks, Norbo! :)