我正在使用Bullet和OpenGL,基本上我有一个身体,我希望它出现在屏幕上但不遭受碰撞。禁用每个碰撞一个身体
它只需要视觉。
我'创建对象是这样的:
btBoxShape* colShape = createBoxShape(btVector3(1, 1, 1));
m_collisionShapes.push_back(colShape);
btTransform startTransform;
startTransform.setIdentity();
btScalar mass(0.5f);
bool isDynamic = (mass != 0.f);
btVector3 localInertia(0, 0, 0);
if (isDynamic)
colShape->calculateLocalInertia(mass, localInertia);
startTransform.setOrigin(btVector3(5.0, 0.5, 0.0));
createRigidBody(mass, startTransform, colShape);
它没有碰撞或与任何其他子弹体互动。
是否有任何标志或类似的东西,以获得此?
事实是,在我编写的代码中,我只是以图形方式绘制Bullet Bodies,以便我想知道是否可以禁用身体碰撞而不是更改代码。 – aserrin55
@ aserrin55这样可以帮助你知道你正在检查哪个标志,或者你在询问什么来决定画什么和不画什么。 – Vallentin
@Vallentin我添加了一个让每个Bullet Body都可视化的类。现在,我需要一个标志或配置参数来禁用混凝土体的碰撞。再次感谢 – aserrin55