(finally) applied patch to fix 'setLocalScaling' of btMultiSphereShape
See https://code.google.com/archive/p/bullet/issues/636 http://bulletphysics.org/Bullet/phpBB3/viewtopic.php?f=9&t=8237 and https://github.com/bulletphysics/bullet3/issues/125
This commit is contained in:
@@ -75,7 +75,7 @@ btMultiSphereShape::btMultiSphereShape (const btVector3* positions,const btScala
|
|||||||
int inner_count = MIN( numSpheres - k, 128 );
|
int inner_count = MIN( numSpheres - k, 128 );
|
||||||
for( long i = 0; i < inner_count; i++ )
|
for( long i = 0; i < inner_count; i++ )
|
||||||
{
|
{
|
||||||
temp[i] = (*pos) +vec*m_localScaling*(*rad) - vec * getMargin();
|
temp[i] = (*pos)*m_localScaling +vec*m_localScaling*(*rad) - vec * getMargin();
|
||||||
pos++;
|
pos++;
|
||||||
rad++;
|
rad++;
|
||||||
}
|
}
|
||||||
@@ -113,7 +113,7 @@ btMultiSphereShape::btMultiSphereShape (const btVector3* positions,const btScala
|
|||||||
int inner_count = MIN( numSpheres - k, 128 );
|
int inner_count = MIN( numSpheres - k, 128 );
|
||||||
for( long i = 0; i < inner_count; i++ )
|
for( long i = 0; i < inner_count; i++ )
|
||||||
{
|
{
|
||||||
temp[i] = (*pos) +vec*m_localScaling*(*rad) - vec * getMargin();
|
temp[i] = (*pos)*m_localScaling +vec*m_localScaling*(*rad) - vec * getMargin();
|
||||||
pos++;
|
pos++;
|
||||||
rad++;
|
rad++;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user