Skip to content

Instantly share code, notes, and snippets.

@rraallvv
Created October 24, 2012 23:45
Show Gist options
  • Save rraallvv/3949643 to your computer and use it in GitHub Desktop.
Save rraallvv/3949643 to your computer and use it in GitHub Desktop.
BroadPhase Snippet
if ( proxy0->m_clientObject == cylinderBody )
{
return ( proxy1->m_clientObject == cylinderBody ); // cylinder must only collide with cylinder
}
if ( proxy0->m_clientObject == boxBody )
{
return ( proxy1->m_clientObject == sphereBody ); // box must only collide with sphere
}
if ( proxy0->m_clientObject == sphereBody )
{
return ( proxy1->m_clientObject == boxBody ); // sphere must only collide with box
}
if ( proxy1->m_clientObject == cylinderBody )
{
return ( proxy0->m_clientObject == cylinderBody ); // cylinder must only collide with cylinder
}
if ( proxy1->m_clientObject == boxBody )
{
return ( proxy0->m_clientObject == sphereBody ); // box must only collide with sphere
}
if ( proxy1->m_clientObject == sphereBody )
{
return ( proxy0->m_clientObject == boxBody ); // sphere must only collide with box
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment