On Heightfield collider

Skip to first unread message

Oleh Derevenko

Oct 18, 2020, 3:06:37 PM10/18/20
to ode-...@googlegroups.com



Why does the heightfield collider assign contact normal as negated plane normal?
dOPESIGN(pContact->normal, =, -, itPlane->planeDef);


If the plane normal is a contact normal for individual triangle plane tests so it should be for the heightfield as a whole.

Or if the function negates the normal because it has to return the contact as if the heightfield is penetrating another object then the contact position should be moved to the other end of the intersection segment as well.

dAddVectorScaledVector3(pContact->pos, contactPos, itPlane->planeDef, planeCurrContact->depth); // Used to be dVector3Copy(contactPos, pContact->pos);


Am I wrong about it?


Oleh Derevenko

-- Skype with underscore
GPG Key Fingerprint: 2F56 32DC DCD9 B2BB 06E9 39E8 A37E 5E60 376E C691


Reply all
Reply to author
0 new messages