Merge pull request #11814 from AndrewMeadows/fix-cylinders

fix cylinder collision shape
This commit is contained in:
David Kelly 2017-11-15 15:24:29 -07:00 committed by GitHub
commit 009e6b252a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -297,7 +297,7 @@ void ShapeEntityItem::computeShapeInfo(ShapeInfo& info) {
const float MIN_RELATIVE_SPHERICAL_ERROR = 0.001f;
if (diameter > MIN_DIAMETER
&& fabsf(diameter - entityDimensions.z) / diameter < MIN_RELATIVE_SPHERICAL_ERROR) {
_collisionShapeType = SHAPE_TYPE_SPHERE;
_collisionShapeType = SHAPE_TYPE_CYLINDER_Y;
} else if (hullShapeCalculator) {
hullShapeCalculator(this, info);
_collisionShapeType = SHAPE_TYPE_SIMPLE_HULL;