convex sweep test: normalInWorldSpace = false

bmeijering
Posts: 3
Joined: Thu Mar 25, 2010 2:50 pm
Location: The Netherlands

convex sweep test: normalInWorldSpace = false

Post by bmeijering »

Hi,

I think I ran into a bug in btCollisionWorld::objectQuerySingle.
I am performing a convex cast of an AABB against a GImpact mesh shape in bullet version 2.73.
At some point I get to the following piece of code.

Code: Select all

if (collisionShape->isConvex())
{
	...
}
else if (collisionShape->isConcave())
{
	if (collisionShape->getShapeType()==TRIANGLE_MESH_SHAPE_PROXYTYPE)
	{
		....
	}
	else
	{
		...

		virtual btScalar reportHit(const btVector3& hitNormalLocal, const btVector3& hitPointLocal, btScalar hitFraction, int partId, int triangleIndex )
		{
			...

			bool	normalInWorldSpace = false;
	
			return m_resultCallback->addSingleResult(convexResult,normalInWorldSpace);
		}		

		...
	}
}
normalInWorldSpace is set to false, but the normal is in world space.

I noticed that in btCollisionWorld::rayTestSingle, normalInWorldSpace is set to false as well, but I wouldn't know if that is incorrect since I am not using that piece of code.

Is this fixed by setting the normalInWorldSpace to true ?

Thanks in advance for your help.

Regards,

Ben Meijering