4
votes
Accepted
Build a convex hull from a given mesh in Bullet
You can do it using btConvexHullShape, calling the addPoint method. But that's usually not what you want. You should manually ...
4
votes
Accepted
Graphical mesh lags behind collision shape in BulletPhysics debug drawing
Note that this answer could be more complete, but, as I'm not a Bullet/physics engine guru, and that I'm not able to easily set up a project right now, I did not have the chance to try and debug the ...
3
votes
Accepted
Bullet Physics Integration - direct movement of rigid bodies
My usual approach here — and one I've seen work well in VR and motion controlled games too — is to compute a velocity that will bring the previous position of the object's physics body to the desired ...
3
votes
Accepted
Integrating Bullet3 into a C++ project - Linking to libraries
After looking further into the differences between the Bullet libraries and my own project turns out the runtime libraries were different. Multi-threaded Debug (/MTd) is the default after building ...
3
votes
Accepted
Bullet Spray RNG
This is a question of game balance and feel, so existence of an 'industry standard' is unlikely.
If you're trying to somewhat approximate real-world projectile spray patterns, a normal distribution ...
3
votes
Bullet 3D Physics Objects Not Rotating?
Your problem is that you're not supplying an inertia vector in the btRigidBodyConstructionInfo constructor. Your rigid body dynamic spheres end up with a default ...
2
votes
Accepted
Bullet Physics too many rigid bodies framerate drops
Apparently, the Debug Drawer i was using was responsible for the performance Issues.
When it is turned off, everything is working as expected.
2
votes
Accepted
Rifle bullets/projectiles in Unity, raycasting or rigidbody?
A simple raycasting would be instantaneous. This is usually referred to as Hitscan. A simple example would be in Doom, some weapons and enemies hit immediately while others can be dodged after they ...
2
votes
2
votes
PyBullet & OpenGL - Rotations are reversed in OpenGL
It turns out that the above code is correct. The issue resided in the OpennGL shader, where I forgot that matrix calculations are non commutive, i.e. ...
1
vote
How to detect all vertices within collision Area?
I am by no means a Blender or collision expert but I assume you have access to internal code of Blender https://github.com/blender/blender , I believe what you are trying to achieve needs calculations ...
1
vote
Accepted
Simulation step size in a physics engine
To close this question I will take what Vaillancourt said in the comment. This article perfectly describes how to handle physics steps.
And to clarify my other question whether we interpolate between ...
1
vote
Accepted
How to move a player on a sphere surface using Ammo.js and Three,js
The character's rigid body is missing angular damping which is causing the spinning to occur.
Calling setDamping on the character's rigidbody with value greater ...
1
vote
Can't get basic example working with Bullet 3 (haxebullet port)
Setting mass for static ground to 0
...
1
vote
Accepted
Angle between character and mouse, and giving bullets velocity in the correct direction
To inverse the spawn point and other useful methods:
...
1
vote
Soft Body rendering from OBJ model
You can't mix immediate mode (glBegin, glEnd, etc.) with the programmable pipeline (shaders) like this. You either need to stick ...
1
vote
Accepted
Should your world map have it's own collision object?
Generating collision from the mesh itself is the usual approach for terrain. This is especially not a performance issue on counter strike-sized maps, as long as you keep the vert density at a somewhat ...
1
vote
Body inside other body after collision
The issue you are describing is known as 'tunneling.'
By far the easiest way to fix this is to take smaller physics steps.
If you render at 60FPS, don't step through the simulation with 16.7ms.
...
1
vote
How to access coordinates of objects in bullet physics (libGDX)?
Note that this is only from reading the doc. I haven't actually tested anything of it.
For some reasons, it appears that Bullet Physics uses the term "origin" for "translation".
I guess that once ...
1
vote
How do I create a HeightField in pybullet?
There are a few ways to load a heightfield based collision shape in PyBullet:
manually: by mathematically creating the height field array
from CSV: loading a csv with the height field information
...
1
vote
Having trouble with btGeometryUtil::isPointInsidePlanes
It turns out I had a fundamental misunderstanding of the purpose of the "isPointInsidePlanes" function. It is not checking whether the point lies on every plane. It is checking whether the point is ...
1
vote
Accepted
Eliminate 0.25 unit 'force fields' around Bullet Physics soft bodies
Look at btCollisionShape.h
All shapes have a setMargin() method.
virtual void setMargin(btScalar margin);
Don't set it to zero though, the manual warns against ...
1
vote
Accepted
Get GameObject which instantiated me in Unity
You must attach a script to the prefab you instantiate and "inject" a reference of the gameobject which has instantiated the prefab as follow :
...
1
vote
Accepted
Bullet: btCollisionWorld::contactTest doesn't work
Found the reason:
sphere->setWorldTransform(btTransform(btQuaternion(), center));
set the sphere with a invalid transform, therefore no collision can be detect....
1
vote
Best practice for RTS accuracy/aim
It really depends on the scale of your game, calculating hit detection can be very expensive if you have a game with units on the scale of a total war kind of game, where you may have hundreds of ...
1
vote
Best practice for RTS accuracy/aim
You should create a parametrical equation. Map each variable (weapon accuracy, stamina, etc.) between 1 and 0, then multiply each value with a weight (if a lower stamina causes lower precision aim ...
1
vote
Calculate damage values from bullet velocity and size
You could change your calculation to make it more fair. That is just trial and error until you are pleased.
What are the properties common to weapons you want to reduce? If you realize bullet size ...
1
vote
Calculate damage values from bullet velocity and size
AKs and M4s are very strong. If you've ever played with an FPS like COD, then you know that you can't really do anything useful against a person with a higher end weapon using a pistol.
To balance ...
1
vote
Understanding HingeConstraint in jBullet
When I ported from OpenDE to Bullet, I was puzzled about this as well. I asked on the forum, and the author answered.
In Bullet you can initialize a Hinge constraint that is in a unsatisfied ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
bullet-physics × 200c++ × 55
physics × 50
collision-detection × 25
opengl × 21
ogre × 16
physics-engine × 15
3d × 14
java × 13
libgdx × 13
c# × 7
rigid-body-dynamics × 7
unity × 6
mathematics × 6
blender × 6
rotation × 5
movement × 5
ios × 5
raycasting × 5
android × 4
python × 4
projectile-physics × 4
xna × 3
box2d × 3
vector × 3