Search found 14 matches

by LastBlow
Sat Feb 09, 2019 9:15 am
Forum: General Bullet Physics Support and Feedback
Topic: activate object after size changes...
Replies: 5
Views: 368

Re: activate object after size changes...

Alright, removing the rigid body and adding it back seems to solve the problem for btConvexHullShape which does not get hung in thin air anymore! Thank you for the quick response, Erwin. Curiously, no change thought for btGImpactMeshShape which would still resize their AABB down but not up. Latest ...
by LastBlow
Mon Feb 04, 2019 6:39 pm
Forum: General Bullet Physics Support and Feedback
Topic: activate object after size changes...
Replies: 5
Views: 368

Re: activate object after size changes...

Alright, removing the rigid body and adding it back seems to solve the problem for btConvexHullShape which does not get hung in thin air anymore! Thank you for the quick response, Erwin. Curiously, no change thought for btGImpactMeshShape which would still resize their AABB down but not up... {...} ...
by LastBlow
Sun Feb 03, 2019 5:29 pm
Forum: General Bullet Physics Support and Feedback
Topic: activate object after size changes...
Replies: 5
Views: 368

Re: activate object after size changes...

The mystery thickens, a short video to illustrate the size changes of an impact mesh shape...
which seems to scale AABB just fine down from the initial size but not up.

https://youtu.be/7kAmT3m1Ixc
by LastBlow
Sun Feb 03, 2019 8:42 am
Forum: General Bullet Physics Support and Feedback
Topic: activate object after size changes...
Replies: 5
Views: 368

Re: activate object after size changes...

Thank you very much for your reply! No, I am not using DISABLE_DEACTIVATION or DISABLE_SIMULATION. When resized, boxes, spheres, cylinders and cones behave normally by either working their way out of the terrain if bigger (usually on top but falling through sometimes) or if smaller by falling on the...
by LastBlow
Thu Jan 31, 2019 4:12 pm
Forum: General Bullet Physics Support and Feedback
Topic: activate object after size changes...
Replies: 5
Views: 368

activate object after size changes...

Hey, hey, hey, I change objects sizes and update their collision shapes, then call the method activateAllObjects() but the objects remain hung in thin air, see pic and code here below... The same method activateAllObjects() works fine elsewhere in the project. If I click on and off on the resized ob...
by LastBlow
Thu Jun 21, 2018 8:33 am
Forum: General Bullet Physics Support and Feedback
Topic: [SOLVED] Rotate camera around constraint object...
Replies: 4
Views: 857

Re: Rotate camera around constraint object...

Right, rotations are always harder than translations... ;-))) Here below the final version - did save the initial transform, then used it to constantly update the basis of the constraint. Only, make sure there are no other constraints on y, so the object can be rotated around y to face the camera: r...
by LastBlow
Sat Jun 16, 2018 9:49 am
Forum: General Bullet Physics Support and Feedback
Topic: [SOLVED] Rotate camera around constraint object...
Replies: 4
Views: 857

Re: Rotate camera around constraint object...

Thank you for the reply! ;-))) Yes, there is a constraint applied to the object, so it can be carried around like it was held in a hand while walking and turning around. Did add the line here below to account for the camera rotation. The object now faces the camera but jerks when grabbed because its...
by LastBlow
Tue Jun 12, 2018 10:41 pm
Forum: General Bullet Physics Support and Feedback
Topic: [SOLVED] Rotate camera around constraint object...
Replies: 4
Views: 857

[SOLVED] Rotate camera around constraint object...

Wanted to ask here while I am trying to figure it out by myself... ;-))) I am rotating the camera around an object with a constraint applied on it, like when you would turn on yourself while holding an object which would then constantly present the same face to you. Only, despite the constraint, the...
by LastBlow
Sun Nov 12, 2017 3:15 am
Forum: General Bullet Physics Support and Feedback
Topic: [SOLVED] texture support in Bullet Physics...
Replies: 2
Views: 1990

Re: texture support in Bullet Physics...

Oh, I sure asked this (totally newbie) question more than an year ago...

Thank you for taking the time to answer, it all make sense now. In fact, I use OpenGL and Blender for visualization.
Will go ahead and mark the question solved.
by LastBlow
Sun Nov 12, 2017 1:47 am
Forum: General Bullet Physics Support and Feedback
Topic: [SOLVED] btGImpactMeshShape scrambled...
Replies: 1
Views: 1222

Re: btGImpactMeshShape scrambled...

Alright, just figured it out, so it can help others... Blender names its indices starting at 1 while Bullet Physics starts at 0. As an example, here below how the vertices and indices for a btTriangleIndexVertexArray should look like for a cube mesh exported from Blender to render properly in Bullet...
by LastBlow
Sun Nov 12, 2017 1:29 am
Forum: General Bullet Physics Support and Feedback
Topic: How do I properly use a TriangleIndexVertexArray?
Replies: 4
Views: 1643

Re: How do I properly use a TriangleIndexVertexArray?

The point is that Blender names the vertices starting at 1 while Bullet Physics starts at 0. Here below another example, the cube mesh. const int NUMBER_VERTICES = 8; const int NUMBER_TRIANGLES = 12; static float bunnyVertices[NUMBER_VERTICES * 3] = { 1.000000, -1.000000, -1.000000, 1.000000, -1.000...
by LastBlow
Sat Nov 11, 2017 10:39 pm
Forum: General Bullet Physics Support and Feedback
Topic: [SOLVED] btGImpactMeshShape scrambled...
Replies: 1
Views: 1222

[SOLVED] btGImpactMeshShape scrambled...

Hi! It seems that Bullet Physics defines the vertices and triangles in a btTriangleIndexVertexArray in a way different from the way they are defined in Blender, so the mesh appears scrambled. For illustration, here below 3 cubes rendered as a btBoxShape and a cube rendered as a btGImpactMeshShape ba...
by LastBlow
Thu Mar 23, 2017 9:38 pm
Forum: General Bullet Physics Support and Feedback
Topic: [SOLVED] Best method for firing projectiles from camera?
Replies: 7
Views: 2328

Re: Best method for firing projectiles from camera?

You may want to first cast a ray and then fire. Here below is a way do it, the variable direction in the second snippet is coming from the raycast or could be the position of your camera. glm::vec3 Camera::castRay(glm::ivec2 mousePosition) { logStderr(VERBOSE, "mouse position %d, %d...\n", mousePosi...
by LastBlow
Mon Jul 11, 2016 10:48 am
Forum: General Bullet Physics Support and Feedback
Topic: [SOLVED] texture support in Bullet Physics...
Replies: 2
Views: 1990

[SOLVED] texture support in Bullet Physics...

Hi, first post here... What would be the best way to apply a texture to a soft body using Bullet Physics, say on an ellipsoid? In particular, how to make the black lines on the ellipsoid disappear? More generally, are textures supported in Bullet and how? Thank you in advance for showing me the way....