Search found 35 matches

by ca$per
Thu Jul 01, 2010 6:26 am
Forum: Research and development discussion about Collision Detection and Physics Simulation
Topic: Proper convex hull creation
Replies: 5
Views: 5252

Re: Proper convex hull creation

Hmm... I actually don't know what the coordinates would be, because i'm reading them from file (a previously saved mesh). And how to change the center of mass of a shape? A rigid body has a function named setCenterOfMassTransform() but i didn't help. Perhaps because it's not a shape's function. I co...
by ca$per
Wed Jun 30, 2010 12:13 pm
Forum: Research and development discussion about Collision Detection and Physics Simulation
Topic: Proper convex hull creation
Replies: 5
Views: 5252

Proper convex hull creation

Hi! It seems i just can't get it right. Here is a snippet: btConvexHullShape *shape = new btConvexHullShape(&vertex->x, vertexCount, 12); //doesn't work //btBoxShape *shape = new btBoxShape(btVector3(5.0f, 5.0f, 5.0f)); //works as expected btVector3 localInertia(0.0f, 0.0f, 0.0f); shape->calcula...
by ca$per
Tue Jun 29, 2010 7:36 am
Forum: General Bullet Physics Support and Feedback
Topic: Assertion in btConvexShape.cpp
Replies: 3
Views: 4283

Assertion in btConvexShape.cpp

Hi! Can someone point me in direction on what can be the cause of this assertion? btConvexShape.cpp on line 108 in convexHullSupport() function: btAssert(ptIndex >= 0); ptIndex is "-1" I just don't know what i did wrong, because i don't know what can lead to this error. I'm not doing any m...
by ca$per
Thu Jun 24, 2010 12:57 pm
Forum: General Bullet Physics Support and Feedback
Topic: Nice looking pseudo destruction
Replies: 20
Views: 13333

Re: Nice looking pseudo destruction

strange.. is your btMotionState implementation right? I mean, what happens if you take out everything apart from the mast and apply a force - does it move as you expect? Something must be wrong if an off axis impulse doesn't make it rotate at all... Here is how my class looks like (taken from previ...
by ca$per
Tue Jun 22, 2010 7:41 am
Forum: General Bullet Physics Support and Feedback
Topic: Deletion of shapes
Replies: 0
Views: 1588

Deletion of shapes

Hi! It seems that i can't delete collision shapes when exiting my app. It crashes with "Access violation reading location 0xcdcdcdc9" in btAlignedAllocator.cpp on line 198: ... if (ptr) { real = *((void **)(ptr)-1); sFreeFunc(real); } ... ptr - is 0xcdcdcdcd Call stack: > ShipViewer.dll!bt...
by ca$per
Mon Jun 21, 2010 6:52 am
Forum: General Bullet Physics Support and Feedback
Topic: Nice looking pseudo destruction
Replies: 20
Views: 13333

Re: Nice looking pseudo destruction

Any other ideas about this?
by ca$per
Fri Jun 18, 2010 6:27 am
Forum: General Bullet Physics Support and Feedback
Topic: Nice looking pseudo destruction
Replies: 20
Views: 13333

Re: Nice looking pseudo destruction

Yeap. I tried: applyImpulse with different impulse and rel_Pos settings; applyTorque/applyTorqueImpulse with different torque settings; And many other things, but it's just not working like it should. Have you seen how other masts behaive on video? It's strange! And with different settings of impuls...
by ca$per
Thu Jun 17, 2010 7:51 am
Forum: General Bullet Physics Support and Feedback
Topic: Many projectiles at once
Replies: 3
Views: 2993

Re: Many projectiles at once

Thanks for an advice. I guess i'll ask there too.
by ca$per
Wed Jun 16, 2010 6:59 am
Forum: General Bullet Physics Support and Feedback
Topic: Nice looking pseudo destruction
Replies: 20
Views: 13333

Re: Nice looking pseudo destruction

Tested with what you proposed. No luck, but there is a difference.
The mast falls like before (sliding), but when touches the ground, it starts to..... perhaps a video will better explain.
http://www.youtube.com/watch?v=Y9yxjOCTJgY
by ca$per
Wed Jun 16, 2010 6:40 am
Forum: General Bullet Physics Support and Feedback
Topic: Many projectiles at once
Replies: 3
Views: 2993

Re: Many projectiles at once

Anyone?
by ca$per
Tue Jun 15, 2010 6:55 am
Forum: General Bullet Physics Support and Feedback
Topic: Nice looking pseudo destruction
Replies: 20
Views: 13333

Re: Nice looking pseudo destruction

Thank you! I guess i missed that part in tutorials. I will test it and report back.

P.S. Yes i have tried with cylinders. Same thing.
by ca$per
Mon Jun 14, 2010 3:03 pm
Forum: General Bullet Physics Support and Feedback
Topic: Many projectiles at once
Replies: 3
Views: 2993

Many projectiles at once

Hi! What is the best way to check for collisions of many (say more then 100) projectiles (simple spheres)? And ofcource respond with special effects, health decrease, etc. Projectiles should not bounce back or anything like that. Just explode on hit. I suppose setting CF_NO_CONTACT_RESPONSE flag is ...
by ca$per
Mon Jun 14, 2010 11:54 am
Forum: General Bullet Physics Support and Feedback
Topic: Nice looking pseudo destruction
Replies: 20
Views: 13333

Re: Nice looking pseudo destruction

Sorry... forgot about it. BreakableMast::BreakableMast(Node *node, const float *vertices, const unsigned long vertexCount): mastNode(node), convexShape(vertices, vertexCount, 12), rigidBody(1.0f, this, &convexShape) { convexShape.calculateLocalInertia(1.0f, btVector3(0.0f, 0.0f, 0.0f)); TheBulle...
by ca$per
Sat Jun 12, 2010 7:28 am
Forum: General Bullet Physics Support and Feedback
Topic: Nice looking pseudo destruction
Replies: 20
Views: 13333

Re: Nice looking pseudo destruction

Perhaps this is where i made mistakes. Here is my class: class BreakableMast: public btMotionState { private: Node *mastNode; btConvexHullShape convexShape; btRigidBody rigidBody; void setWorldTransform(const btTransform &worldTrans) { Transform4D transform; worldTrans.getOpenGLMatrix(static_cas...
by ca$per
Thu Jun 10, 2010 7:34 am
Forum: General Bullet Physics Support and Feedback
Topic: Nice looking pseudo destruction
Replies: 20
Views: 13333

Re: Nice looking pseudo destruction

Yes, an impulse to the top of the mast should certainly give it some rotation. How are you calculating the relpos value? I got caught out by assuming it would be in object local coordinates, but it's actually in world space. That's strange. I sure read from the forum that they are in local space an...