Skip to content
Snippets Groups Projects
Commit 998949a8 authored by vwitten's avatar vwitten
Browse files

fixed an issue with the bullet object size for primitives

git-svn-id: http://svn.code.sf.net/p/simox/code/trunk@648 042f3d55-54a8-47e9-b7fb-15903f145c44
parent a9aab519
No related branches found
No related tags found
No related merge requests found
......@@ -157,7 +157,8 @@ btCollisionShape* BulletObject::getShapeFromPrimitive(VirtualRobot::Primitive::P
if (primitive->type == Primitive::Box::TYPE)
{
Primitive::Box* box = boost::dynamic_pointer_cast<Primitive::Box>(primitive).get();
btBoxShape *boxShape = new btBoxShape(btVector3(box->width / 1000.f, box->height / 1000.f, box->depth / 1000.f));
// w/h/d have to be halved
btBoxShape *boxShape = new btBoxShape(btVector3(box->width / 2000.f, box->height / 2000.f, box->depth / 2000.f));
result = boxShape;
}
else if (primitive->type == Primitive::Sphere::TYPE)
......
......@@ -7,8 +7,8 @@
</Visualization>
<CollisionModel>
<Primitives>
<!--Box width="136" height="190" depth="40"/-->
<Sphere radius="50"/>
<Box width="136" height="190" depth="40"/>
<!--Sphere radius="50"/-->
</Primitives>
</CollisionModel>
</ManipulationObject>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment