m_normalWorldonB

markhula
Posts: 34
Joined: Thu Jun 17, 2010 10:11 am

m_normalWorldonB

Post by markhula »

Hi all,

During a collision this doesn't seem to always return the correct collision normal.
With a cube making contact on a flat plane I got:

0.000000 0.557960 0.829868
0.000000 -0.000003 1.000000
0.000000 -0.000003 1.000000
0.000001 0.000000 1.000000
-0.000001 0.000000 1.000000
0.000000 -0.000003 1.000000
0.000000 0.000006 1.000000
0.000003 0.000000 1.000000
0.000000 0.000000 1.000000
0.000000 0.557960 0.829868
0.000000 0.557959 0.829869
0.000000 0.557960 0.829868
0.000000 0.557960 0.829868

Surely the Y component is bouncing around too much?

In my collision callback I simply:

terrain_normal=_btManifoldPoint.m_normalWorldOnB;

Please tell me where I am going wrong or indeed my mis-understanding/mis-use of m_normalWorldOnB.

Thanks in advance
SteveDeFacto
Posts: 31
Joined: Sat Jul 23, 2011 4:24 pm

Re: m_normalWorldonB

Post by SteveDeFacto »

Bump. I'm having the same problem and the random variations in the normal are a serious problem for me. Can this be fixed?
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Re: m_normalWorldonB

Post by Erwin Coumans »

Is this against a btStaticPlaneShape?
SteveDeFacto
Posts: 31
Joined: Sat Jul 23, 2011 4:24 pm

Re: m_normalWorldonB

Post by SteveDeFacto »

Erwin Coumans wrote:Is this against a btStaticPlaneShape?
For me it's a btBvhTriangleMeshShape.
MaxDZ8
Posts: 149
Joined: Fri Jun 24, 2011 8:53 am

Re: m_normalWorldonB

Post by MaxDZ8 »

Erwin Coumans wrote:Is this against a btStaticPlaneShape?
By the way, I have tried BasicDemo with btStaticPlaneShape. Looks like restitution is much stronger than the default btBoxShape. I'd like to have a better understanding of what's happening. It is my current understanding that btStaticPlaneShape will avoid quantum effects completely being effectively an infinitely tick, infinitely wide brick but I wasn't expecting a so different result. Is it intended?