Page 1 of 1

About the opacity of softbody and rigidbody in Bullet

Posted: Thu Oct 25, 2012 2:32 am
by wolves86
Hello everyone:
I used CreatePatch function to get a big cloth and rendered the triangles using the following code.

glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glBegin(GL_TRIANGLES);
glColor4f(color.getX(), color.getY(), color.getZ(),0.5);
glNormal3d(n.getX(),n.getY(),n.getZ());
glVertex3d(a.getX(),a.getY(),a.getZ());
glVertex3d(b.getX(),b.getY(),b.getZ());
glVertex3d(c.getX(),c.getY(),c.getZ());
glEnd();
glDisable(GL_BLEND);
I can get a transparent cloth with the opacity parameter equal 0.5. But the cloth will shelter rigidbodies. That is to say, I can see rigidbodies through the cloth. So could you help me?