Made cylinders and spheres act as spheres

This commit is contained in:
FlareMicrosystems
2022-10-01 23:12:55 -07:00
parent ce999d226d
commit d3f9b74ba1
2 changed files with 135 additions and 130 deletions

View File

@@ -7,11 +7,6 @@
#include "strsafe.h"
#include "Application.h"
/*typedef struct typPRGP {
Instance* instance; // Declare member types
Property ∝
} PRGP;*/
std::vector<PROPGRIDITEM> prop;
std::vector<Instance*> children;
Instance * selectedInstance;

View File

@@ -73,13 +73,14 @@ void XplicitNgine::createBody(PartInstance* partInstance)
partInstance->physBody = dBodyCreate(physWorld);
// Create geom
if(partInstance->shape == Enum::Shape::Block)
{
partInstance->physGeom[0] = dCreateBox(physSpace,
partInstance->getSize()[0],
partInstance->getSize()[1],
partInstance->getSize()[2]
);
// Debug output
dVector3 result;
dGeomBoxGetLengths(partInstance->physGeom[0], result);
printf("[XplicitNgine] Part Geom Size: %.1f, %.1f, %.1f\n",
@@ -87,6 +88,15 @@ void XplicitNgine::createBody(PartInstance* partInstance)
result[1],
result[2]
);
}
else
{
partInstance->physGeom[0] = dCreateSphere(physSpace, partInstance->getSize()[0]/2);
}
// Debug output
// Create rigid body
printf("[XplicitNgine] Created Geom for PartInstance\n");