Search found 33 matches

by water
Thu Jul 02, 2020 1:08 am
Forum: General Bullet Physics Support and Feedback
Topic: When the rigid body becomes more, the program becomes stuck
Replies: 7
Views: 8834

Re: When the rigid body becomes more, the program becomes stuck

In other posts, you mentioned the reason why my program will get stuck. What should I do to avoid it. Thank you very much
by water
Thu Jul 02, 2020 12:48 am
Forum: General Bullet Physics Support and Feedback
Topic: find a certain internal position of the 3D model
Replies: 4
Views: 6438

Re: find a certain internal position of the 3D model

Drleviathan, thank you very much for your help. I want to realize the movement of the ball in the imported model (similar to a tube). I want to place the ball in a certain position inside the model, and then fall under the influence of gravity and collide with the inner wall of the model. However, a...
by water
Wed Jul 01, 2020 8:20 am
Forum: General Bullet Physics Support and Feedback
Topic: find a certain internal position of the 3D model
Replies: 4
Views: 6438

find a certain internal position of the 3D model

I imported a 3D model of. Obj. I want to place small balls in some positions of the model, but I can't find a certain internal position of the 3D model, as shown in the figure. What should I do? Thank you for your time http://m.qpic.cn/psc?/76b33374-4a0f-4a5d-99b2-b6eef432e262/M4X34P*UDwP*fok89st23w...
by water
Wed Jul 01, 2020 7:01 am
Forum: General Bullet Physics Support and Feedback
Topic: When the rigid body becomes more, the program becomes stuck
Replies: 7
Views: 8834

Re: When the rigid body becomes more, the program becomes stuck

I have encountered this problem, can you tell me what I should do? thank you

Code: Select all

CProfileManager::dumpAll();
Error 2 error C2653: 'CProfileManager' : is not a class or namespace name
by water
Wed Jul 01, 2020 3:01 am
Forum: General Bullet Physics Support and Feedback
Topic: When the rigid body becomes more, the program becomes stuck
Replies: 7
Views: 8834

When the rigid body becomes more, the program becomes stuck

I want to achieve the collision effect of small balls, but I found that when I increase the number of small balls, the program becomes stuck. What should I do to solve this problem? Thank you very much
by water
Sun Jun 28, 2020 3:47 am
Forum: General Bullet Physics Support and Feedback
Topic: How to get the internal coordinates of rigid bodies
Replies: 0
Views: 16011

How to get the internal coordinates of rigid bodies

I created a cuboid rigid body, how should I get all the coordinates of its interior space. Thank you very much.
by water
Wed Jun 24, 2020 7:36 am
Forum: General Bullet Physics Support and Feedback
Topic: When the external rigid body moves, the collision objects inside the rigid body leak out
Replies: 3
Views: 3414

When the external rigid body moves, the collision objects inside the rigid body leak out

I set up a cuboid, and set up a small ball in the inside of the cuboid to fall under the influence of gravity and spring up elastically. I set the Euler angle of the cuboid rotation, but I found that when the Euler angle changes a little, the ball can move normally, but when I increase the degree, t...
by water
Wed Jun 24, 2020 7:28 am
Forum: General Bullet Physics Support and Feedback
Topic: How to solve the problem of the ball penetrating the cuboid
Replies: 6
Views: 5170

Re: How to solve the problem of the ball penetrating the cuboid

drleviathan wrote: Wed Jun 24, 2020 6:21 am The simple way to do it is to use: btCollisionObject::setWorldTransform()

So the code might look like this:

Code: Select all

btTransform t = body->getWorldTransform();
t.setRotation(btQuaternion(roll, pitch, yaw));
body->setWorldTransform(t);

Thank you very much
by water
Wed Jun 24, 2020 12:50 am
Forum: General Bullet Physics Support and Feedback
Topic: How to solve the problem of the ball penetrating the cuboid
Replies: 6
Views: 5170

Re: How to solve the problem of the ball penetrating the cuboid

Thank you very much for your reply. I found that initobjectground() in my code was initialized only once, so btquaternion quaternion = btquaternion (yaw, pich, roll); it was also called only once, resulting in unable to change the Euler angle of the model. Can I ask if there is any way to control th...
by water
Tue Jun 23, 2020 3:42 am
Forum: General Bullet Physics Support and Feedback
Topic: How to solve the problem of the ball penetrating the cuboid
Replies: 6
Views: 5170

Re: How to solve the problem of the ball penetrating the cuboid

I want to change the Euler angle in real time through the keyboard and display it through OpenGL,I put the initialization of the model in InitObjectground();But the model doesn't move when I press the key to change yaw roll glPushMatrix(); glTranslated(float(trans.getOrigin().getX()), float(trans.ge...
by water
Tue Jun 23, 2020 2:11 am
Forum: General Bullet Physics Support and Feedback
Topic: How to rotate a rigid body by changing the Euler angle
Replies: 0
Views: 16212

How to rotate a rigid body by changing the Euler angle

I set up a rigid body, and I hope that I can change his rotation by changing his Euler angle through the keyboard, and display him through OpenGL. What should I do? btQuaternion quaternion = btQuaternion(yaw, pich, roll); groundTransform.setRotation(quaternion); glRotatef(trans.getRotation().getW(),...
by water
Mon Jun 22, 2020 10:24 am
Forum: General Bullet Physics Support and Feedback
Topic: How to solve the problem of the ball penetrating the cuboid
Replies: 6
Views: 5170

How to solve the problem of the ball penetrating the cuboid

Code: Select all

	
	btQuaternion quaternion = btQuaternion(yaw,pich,roll);
	quaternion.setEuler(yaw, pitch, roll);
	groundTransform.setRotation(quaternion);
I want to rotate the rigid body by setting the Euler angle, but there is an error. Can you help me to see how to write it?
by water
Mon Jun 22, 2020 3:18 am
Forum: General Bullet Physics Support and Feedback
Topic: How to solve the problem of the ball penetrating the cuboid
Replies: 7
Views: 5586

Re: How to solve the problem of the ball penetrating the cuboid

The btBvhTriangleMeshShape is effectively a triangle-soup with BVH tree around it. It can collide as concave mesh. The triangle faces collide on both sides so you can make dynamic things bounce around on the inner surface... as long as they aren't too small and moving too fast and/or you have conti...
by water
Mon Jun 22, 2020 3:18 am
Forum: General Bullet Physics Support and Feedback
Topic: How to solve the problem of the ball penetrating the cuboid
Replies: 7
Views: 5586

Re: How to solve the problem of the ball penetrating the cuboid

Thank you very much for your help. I used the btCompoundShape and successfully implemented it. Thank you again for your help