Fix #29434: Cone collision bounds is on the wrong axis
authorSergey Sharybin <sergey.vfx@gmail.com>
Mon, 28 Nov 2011 16:25:42 +0000 (16:25 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Mon, 28 Nov 2011 16:25:42 +0000 (16:25 +0000)
Because of strange reason, cone boundbox was rotated and it wasn't
reflecting physics engine which used "correct" cone boundbox.

Changed displaying of cone bounding box type.

source/blender/editors/space_view3d/drawobject.c

index ffdb8110edc8f933a01557e664bc6ba1638b9a7b..1162708f97521fc7f42e8d2aafe87728da3f0e9b 100644 (file)
@@ -5793,9 +5793,8 @@ static void draw_bb_quadric(BoundBox *bb, char type)
        }
        else if(type==OB_BOUND_CONE) {
                float radius = size[0] > size[1] ? size[0] : size[1];
-               glTranslatef(cent[0], cent[2]-size[2], cent[1]);
-               glScalef(radius, 2.0f * size[2], radius);
-               glRotatef(-90., 1.0, 0.0, 0.0);
+               glTranslatef(cent[0], cent[1], cent[2]-size[2]);
+               glScalef(radius, radius, 2.0f * size[2]);
                gluCylinder(qobj, 1.0, 0.0, 1.0, 8, 1);
        }
        glPopMatrix();