bugfix for compound versus concave: compute the DeltaC2 after computing the (child) transforms for proper center
This commit is contained in:
@@ -1224,13 +1224,10 @@ static const char* satKernelsCL= \
|
||||
" posA.w = 0.f;\n"
|
||||
" float4 posB = rigidBodies[bodyIndexB].m_pos;\n"
|
||||
" posB.w = 0.f;\n"
|
||||
" float4 c0local = convexPolyhedronA.m_localCenter;\n"
|
||||
"\n"
|
||||
" float4 ornA = rigidBodies[bodyIndexA].m_quat;\n"
|
||||
" float4 c0 = transform(&c0local, &posA, &ornA);\n"
|
||||
" float4 c1local = convexShapes[shapeIndexB].m_localCenter;\n"
|
||||
" float4 ornB =rigidBodies[bodyIndexB].m_quat;\n"
|
||||
" float4 c1 = transform(&c1local,&posB,&ornB);\n"
|
||||
" const float4 DeltaC2 = c0 - c1;\n"
|
||||
"\n"
|
||||
" \n"
|
||||
"\n"
|
||||
"\n"
|
||||
@@ -1252,6 +1249,12 @@ static const char* satKernelsCL= \
|
||||
" }\n"
|
||||
" //////////////////\n"
|
||||
"\n"
|
||||
" float4 c0local = convexPolyhedronA.m_localCenter;\n"
|
||||
" float4 c0 = transform(&c0local, &posA, &ornA);\n"
|
||||
" float4 c1local = convexShapes[shapeIndexB].m_localCenter;\n"
|
||||
" float4 c1 = transform(&c1local,&posB,&ornB);\n"
|
||||
" const float4 DeltaC2 = c0 - c1;\n"
|
||||
"\n"
|
||||
"\n"
|
||||
" bool sepA = findSeparatingAxisLocalA( &convexPolyhedronA, &convexShapes[shapeIndexB],\n"
|
||||
" posA,ornA,\n"
|
||||
|
||||
Reference in New Issue
Block a user