Questions tagged [bullet-physics]

Bullet is a professional, free 3D Game Multiphysics Library that provides state of the art collision detection, soft body and rigid body dynamics.

Filter by
Sorted by
Tagged with
0 votes
0 answers
15 views

Solving for radius and acceleration in spherical motion

I'm trying to solve a spherical motion problem which requires that I use applyForce and applyTorque methods in Javascript's Physijs engine (bullet3 transipiled with emscripten) I have peripheral ...
user avatar
0 votes
1 answer
59 views

Why does OnTriggerEnter2D/OnCollisionEnter2D work when there is no other collider object opposite?

my bullet: There is a Box collider (checked "is Trigger") It has Rigidbody2D (Gravity = 0, freeze rotation Z) https://imgur.com/T4j1QoO I added the "OnTriggerEnter2D" function ...
user avatar
  • 13
0 votes
1 answer
263 views

Raycasting in GameMaker Studio 2 to implement hitscan weapons?

I'm working on a 2D top-down shooter game in GameMaker Studio 2, featuring different weapons and obstacles all around the levels. Since I don't need a high degree of simulation, I'm implementing ...
user avatar
  • 3,904
0 votes
1 answer
41 views

How to detect all vertices within collision Area?

Using collision detection algorithms such as MPR (Minkowski Portal Refinement), GJK (Gilbert–Johnson–Keerthi distance algorithm), you can calculate the penetration depth in the collision. For 2 mesh ...
user avatar
  • 101
1 vote
1 answer
233 views

Simulation step size in a physics engine

I am trying to integrate a physics engine (Bullet) into my game engine, but I immediately found that I do not know how big should I make the simulation step. I think of 2 options: Use a fixed step ...
user avatar
1 vote
1 answer
366 views

How to move a player on a sphere surface using Ammo.js and Three,js

I am moving a rigidbody (the character) on the surface of a sphere, like what is described here. I am facing the following issue that I am having hard time to solve: After moving the character, it ...
user avatar
  • 151
0 votes
0 answers
52 views

LibGDX program crashing on on StepSimulation call

I am trying to add a Character Controller to a Discrete Dynamics World in Bullet via the LibGDX wrapper and everything seems to work, but when I attempt to update the world via the StepSimulation ...
user avatar
0 votes
0 answers
60 views

How to create soft tires like in `Spintires`?

Here is an screenshot of a deformed tire in the game Spintires. I would like to achieve a similar effect in my game I'm using Bullet as the physics library, if that matters.
user avatar
1 vote
1 answer
241 views

PyBullet & OpenGL - Rotations are reversed in OpenGL [closed]

Project description: I am writing a basic game engine to help with my PhD topic on multi-agent learning. I am using PyBullet as the backend physics engine and OpenGL for visual display. I have OpenGL ...
user avatar
1 vote
0 answers
58 views

Subtract a circle on a rectangle - OpenGL

I am writing a game using GLFW, GLEW, GLM and Bullet3 in C++. Its a Maze with holes. I am doing the floor with rectangles (wich is 2 GL_TRIANGLES). I want to make some woles (circles), to the ball ...
user avatar
-1 votes
1 answer
81 views

Can't get basic example working with Bullet 3 (haxebullet port)

Example of my code: ...
user avatar
0 votes
1 answer
120 views

Bullet Physics Invalid Pointer on Free

I'm writing a game engine in C++ with Irrlicht and Bullet Physics. All of my Irrlicht code works perfectly, but upon creating Bullet Physics objects with new, and later freeing them, my program throws ...
user avatar
0 votes
1 answer
257 views

Bullet Physics Step Simulation Crash when maxSubSteps is not 0

I am using Bullet physics along with Irrlicht. My program consistently crashes when maxSubSteps is not set to zero when calling ...
user avatar
1 vote
0 answers
47 views

Real-time 3D Scene-reconstruction into Physics Engine

I am trying to create a game where the user scans the room using RGBD camera and reconstructs 3D scene. This scene would be integrated into physics engine, after an object recognition algorithm tells ...
user avatar
1 vote
0 answers
90 views

Bullet Physics stops detecting collision after a few steps

Let me start off by saying that the usage of Bullet here is slightly unconventional. I'm writing a server emulator for a game, and the server is only keeping track of the triggers, players and enemies....
user avatar
  • 11
2 votes
1 answer
90 views

Angle between character and mouse, and giving bullets velocity in the correct direction

I've been trying to work for a few days, on a little weapon system where you can aim with your mouse and shoot bullets in the direction you're aiming. This is all in 2D to be clear. Right now, I can ...
user avatar
0 votes
1 answer
219 views

Soft Body rendering from OBJ model

As part of my master thesis I have to do an softbody simulation. I 'm using Bullet Physics engine. I'm trying to render softbody, create from Meshes, with Shaders in OpenGL but the object doesnt ...
user avatar
1 vote
0 answers
41 views

Bullet Physics ignore collision from bottom

I'm currently using BulletSharp a wrapper for Bullet physics. I'm using Bullet Physics for a 2D project. Many platform games allow the player to pass through a platform as they jump upwards, and then ...
user avatar
1 vote
0 answers
302 views

Bullet physics convex hull center of mass

I am trying to make a convex hull collider for bullet physics. I am using BulletSharp.CompoundShape and BulletSharp.ConvexHullShape. This is model of a chair in unity with rigidbody and convex mesh ...
user avatar
  • 108
0 votes
1 answer
259 views

Bullet Physics DebugDraw Unexpected Results

I'm integrating Bullet Physics into my project for collision detection and have just gotten some debug draw functionality to work. However, the results are not what I'm expecting. I have tried to draw ...
user avatar
  • 171
1 vote
0 answers
218 views

Bullet Physics StepSimulation really slow when smaller TriangleMeshShape is inside bigger BoxShape

I observed that bullet physics StepSimulation is very very slow when a rigidbody with a TriangleMeshShape is fully inside a rigidbody with a simple BoxShape. I noticed that when I move the ...
user avatar
  • 328
1 vote
1 answer
147 views

Should your world map have it's own collision object?

I am attempting to understand collision detection at the moment. I have seen many examples of a simple flat plane with boxes or cubes which move around on the plane and react when the touch each other ...
user avatar
  • 171
0 votes
0 answers
135 views

Solve Constraints with linear factor of 0 in Bullet Physics

In my code I need to set the linear factor for velocity to 0 (sometimes). For example, game->rigidBody->setLinearFactor(btVector3(0, 0, 0)); When this is done,...
user avatar
  • 121
1 vote
0 answers
104 views

btBvhTriangleMeshShape useQuantizedAabbCompression Crash

I use btBvhTriangleMeshShape for static world collision. Generally this works fine, but recently I have encountered situations where the construction of btBvhTriangleMeshShape would crash. In debug ...
user avatar
  • 2,826
1 vote
0 answers
64 views

Handling strange physics behaviour while sliding between coplanar surfaces

We've got a character setup based around manually resolving collisions, and we're using bullet to do so. Our characters have a kinematic rigidbody to push things around, but their movement and ...
user avatar
1 vote
1 answer
664 views

Bullet Physics Integration - direct movement of rigid bodies

I'm adding bullet physics to my engine. The physics simulation bits are all working nicely, but one bit I'm struggling with is being able to move objects using their co-ordinates, and then have them ...
user avatar
  • 186
2 votes
1 answer
1k views

Integrating Bullet3 into a C++ project - Linking to libraries

I've been following the BulletQuickstart guide and I get as far as generating the vs2010 solution and converting to newer. I've also been following this very good answer from a few years ago and have ...
user avatar
  • 51
0 votes
1 answer
163 views

bullet raycast vehicle - understanding coordinate system

Bullet world space coordinate system is the same as opengl world coordinate system. I have noticed that raycast vehicle has the following function: ...
user avatar
  • 103
1 vote
1 answer
274 views

Detect collision with bullet physics, to make a character controller

I inherited from btCollisionWorld::ContactResultCallback but I really have no idea how to use this virtual function: ...
user avatar
0 votes
0 answers
194 views

btRigidBody world transform and scale issue

When I create a collision shape for rigid body (in this case box) I use vertices positions and scale from the opengl matrix, the code looks this way: ...
user avatar
  • 103
0 votes
1 answer
125 views

Body inside other body after collision

I'm using bullet to create a 2D topdown game. In my physics proof of concept, I can walk around and push a box. However, if I walk too fast the character goes through the box, instead of colliding ...
user avatar
0 votes
1 answer
59 views

How to deal with standing/walking models?

I'm developing a game using bullet for the physics logic, but rendering using my own isometric algorithm (sprites). I'm currently dealing with the issue of how the physics object of the player would ...
user avatar
  • 25
1 vote
2 answers
496 views

How to access coordinates of objects in bullet physics (libGDX)?

I need to access the x, y and z coordinates of a bullet physics object. I'm assuming this is done via the transform matrix, but I have no idea which values mean what. There doesn't seem to be any ...
user avatar
  • 25
0 votes
1 answer
122 views

Bullet Spray RNG

So I have a Nuclear-Throne like weapon system in my game, and I'm working on bullet spray. Originally, there was equal odds that the bullet sprayed at any angle within the spray range. That felt ...
user avatar
2 votes
1 answer
441 views

How do I create a HeightField in pybullet?

I've been looking for documentation on PyBullet, the python implementation of Bullet, but I haven't yet found a way to implement the btHeightfieldTerrainShape collision object, which I need to make, ...
user avatar
  • 61
0 votes
1 answer
172 views

Bullet Physics too many rigid bodies framerate drops

I have a question regarding rigid bodies in bullet physics. At the moment I have low-poly asteroids, which I create a convex Hull shape. Then I add a motion state and give them a linear velocity. ...
user avatar
  • 55
0 votes
1 answer
37 views

Having trouble with btGeometryUtil::isPointInsidePlanes

I'm in the process of parsing a BSP file to create btConvexHullShape objects for each brush. I've seen a few examples of how to do this on Github and they all use the getVerticesFromPlaneEquations ...
user avatar
1 vote
0 answers
282 views

Handling character with world object collision in libgdx and bullet

I am using libgdx and bullet for my 3d mmo project. I have been able to detect collisions using a collision world with collision objects. This was working fine for things like detecting players ...
user avatar
0 votes
1 answer
85 views

Eliminate 0.25 unit 'force fields' around Bullet Physics soft bodies

When I create soft body assemblies in Bullet Physics they will fall under gravity and then float about 0.25 units above a ground plane rigid body, and other rigid bodies all appear to push and ...
user avatar
  • 105
0 votes
1 answer
746 views

Get GameObject which instantiated me in Unity

How can I get a GameObject from another GameObject? If I know, that the GameObject I want to get instantiated(using function Instantite()) the GameObject from which I want to get it. If there is no ...
user avatar
1 vote
1 answer
8k views

Rifle bullets/projectiles in Unity, raycasting or rigidbody?

Hello again gamedevers :) I'm trying to create a fairly simple FPS shooter game. Im using a Rigidbody FPS Controller prefab from ...
user avatar
2 votes
0 answers
289 views

Bullet Physics Scaling rotational part of 6DoF Spring Damper

I am currently trying to scale up my setup (consisting of two rigid bodies connected by a btGeneric6DofSpring2Constraint) to fall within the suggested dimensions for a concise simulation. In order to ...
user avatar
  • 121
3 votes
1 answer
2k views

Build a convex hull from a given mesh in Bullet

According to this tutorial, a convex hull is the most accurate shape one can build from a mesh? I have two questions regarding this: How do I build a convex hull from a given, complex mesh in Bullet? ...
user avatar
  • 451
3 votes
1 answer
944 views

Graphical mesh lags behind collision shape in BulletPhysics debug drawing

In Bullet Physics when I debug draw physics world the graphical mesh lags behind the collsion shape. ...
user avatar
0 votes
1 answer
527 views

Bullet: btCollisionWorld::contactTest doesn't work

I added some boxes in a collision world, then use btCollisionWorld::contactTest to test if any box contact with a given sphere. Below is the code: ...
user avatar
  • 111
0 votes
2 answers
345 views

Best practice for RTS accuracy/aim

As I'm developing a RTS game set during the Napoleonic Campaign, I've got a question about the best method to implement 'bad aim' for the AI, as the accuracy of muskets were quite terrible back then. ...
user avatar
0 votes
4 answers
1k views

Calculate damage values from bullet velocity and size

I'm trying to make a top-down game using Javascript and Pixi which involves multiple different guns. Instead of giving each gun an individual damage value, I wanted to calculate the damage by the ...
user avatar
  • 101
1 vote
2 answers
1k views

Rigid body physics resolution causing never ending bouncing and jittering

I'm trying to make a fairly simple, impulse based rigid body simulator as part of a Uni assignment. I'm using bullet physics to perform collision detection, and my own code to perform collision ...
user avatar
1 vote
1 answer
137 views

Is it possible to find the child body involved in a collision of a compound shape?

I am noob at using bullet physics. I am using it for collison detection and I want to create a compound body to represent a ship. However, in my game I need to know which part of the ship was hit. ...
user avatar
  • 11
0 votes
2 answers
767 views

Make a bullet shape around model in libgdx

How do I make a btBoxShape around a Model or ModelInstance in Libgdx? This is my code: ...
user avatar