properly implement sphere collision shape support
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11694 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
2538646b6b
commit
19d0c04774
@ -122,7 +122,12 @@ void ThreeDAnimation::createPhysicsBody(const std::string &shape)
|
||||
{
|
||||
m_collision_shape = new btCylinderShapeZ(0.5f*extend);
|
||||
}
|
||||
|
||||
else if(shape=="sphere")
|
||||
{
|
||||
float radius = std::max(extend.getX(), extend.getY());
|
||||
radius = 0.5f*std::max(radius, extend.getZ());
|
||||
m_collision_shape = new btSphereShape(radius);
|
||||
}
|
||||
else if(shape=="exact")
|
||||
{
|
||||
TriangleMesh* triangle_mesh = new TriangleMesh();
|
||||
|
Loading…
Reference in New Issue
Block a user