Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [physics-engine]

Software for simulating physics like collisions, forces, mass, joints, motion etc. Examples of physics engines are PhysX, Havok, Bullet and ODE.

0
votes
0answers
30 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,...
0
votes
2answers
19 views

Dividing properties between RigidBody and Collider

I am currently making a physics engine in Rust. The 2 main data structures concerning collision detection are: RigidBody: Physics-related aspects of the body. Contains a reference to a Collider ...
0
votes
0answers
30 views

Full energy transfer between two identical objects

I'm trying to simulate a game like billiards / shuffleboard / curling where two objects collide and under a perfect direct hit all energy is transferred to the second object. Both ...
2
votes
1answer
71 views

Box2D physics are different on server and client

I'm using C# Box2D library for my server and client, they have similar world.step(), iterations and update function. At the same time they have different physics' results, difference is not fixed, it ...
0
votes
0answers
32 views

How would I go about implementing crowd physics?

I'm working on a wave based game where enemies come at you in waves, and I'm stumped on this. I've tried a few things, but nothing really has worked. This is in 2D. It would look like a crowd of ...
2
votes
1answer
99 views

How do force fields scale?

Setting I am designing a 2d game in which a \$1/r^2\$ force acts between moving charged particles, and the number \$n\$ of particles is very large. To calculate the force between all pairs of ...
0
votes
0answers
58 views

Unity like RigidBody physics in PyGame

I am trying to make game but first I want to make simple simulator. The goal is to have a ball fall onto a surface and then roll off the edge. Here is my code: ...
0
votes
1answer
72 views

Physics engine and rigidbody sleep optimization

I am trying to add sleep optimization to my little physics engine(just for learning). I use SAT for collision detection that returns penetration normal and depth without contact points. Objects are ...
1
vote
1answer
95 views

Unity Physics Simulation - Limitations / Inaccuracies? Bounciness of a ball (pool/snooker balls etc)

I am playing with Unity physics engine. I have a pool table and a cue ball. Both have Physic Materials. If I start the game, with the ball floating about 1m above the table, it falls and bounces (...
0
votes
1answer
106 views

Terrain collision with sphere and OBB

I'm implementing my physics engine for my 3D game. So far I've been able to implement collision detection between OBB, spheres and planes. The engine generate contacts and resolve them with an ...
2
votes
1answer
47 views

How to make a motorcycle running on a vertical circular track(loop-da-loop) without falling down due to gravity?

I am currently developing a game, motorcycle type game. Of course, my map is not just made up of simple line or curve. For example: a vertical circular track in the map. i've seen most 2D motorcycle ...
1
vote
1answer
89 views

Wall collision response results in jittery physics

I have the following game loop : ...
0
votes
1answer
64 views

Choosing the correct normal for a collision

I have taken the task of building a basic impulse physics engine. Circle vs Circle collision resolution has been done and I moved onto Line vs Circle. I can detect a collision and know that the normal ...
1
vote
1answer
130 views

Physics - How to calculate the next position of a ball rolling against a slope?

For a small C/C++ game project, I want to add some physics on a ball, to allow it to roll against the slopes of a 3d world, in the same way as the example visible in the image below: However I have ...
15
votes
5answers
5k views

Why integrate over accumulation?

I'm starting to learn how to DIY physics, and I have a question about implementing integration at the most basic level (i.e. this is not a Euler vs. RK4 question). Nearly every example I come across ...
1
vote
0answers
17 views

Deformable meshes based on torsional spring

I am trying to learn physics-based animation thanks to the book "Foundation of Physically-Based Modelling and Animation". They introduce the mass-spring model for deformable meshes. Although making ...
0
votes
0answers
95 views

Networked physic + quadtree

I have some problem with understanding how to use quadtree to divide physic world (p2.js engine btw.) and synchronize this world with clients. Here are some informations about my game: Host & ...
0
votes
1answer
307 views

Unity Bowling ball physics

I am working on Bowling Ball game for android. And I want the Bowling Ball to feel like a Bowling ball in the real world. I've already tweaked the Rigidbody values and PhysicsMaterial but it's giving ...
0
votes
2answers
63 views

How do I determine the slope of a curve?

I am making a 2D game where the character rides on the curve of a graph. I need to find out whether the player is going uphill or downhill and calculate speed accordingly. The problem is that I am ...
6
votes
4answers
283 views

physics engine without time steps

I'm looking for physics engines that doesn't use time steps. I don't think time steps are reliable, and I don't like how without tweaking the engine a bullet going too fast can pass through a wall ...
2
votes
1answer
65 views

Transfering an inertia tensor from local coordinates to another one

If we have an inertia tensor in local coordinates with a basis matrix B and we want to transform it to other local coordinates with basis matrix A, is it right to do the following: A* inv(B) *Inertia ...
0
votes
1answer
22 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 ...
1
vote
1answer
140 views

Impulse resolution for purely rotational collisions (relative linear velocity = 0)

I've been writing a basic physics engine, (loosely) following Randy Gaul's online tutorial. I have been using this equation that he derives: $$j=\frac{-(1+e)((V^A-V^B)*t)}{\frac{1}{{mass}^A}+\frac{1}{...
0
votes
1answer
64 views

How can I resolve collisions a little better?

I'm currently developing a physics engine and I'm not sure the best way to go about resolving my problem. I have a little box, that I can move around with in my scene. When I'm resolving collisions, ...
0
votes
1answer
39 views

Applying friction force not working correctly

I have a simple physics simulation I'm creating whilst following the Nature of Code tutorials on YouTube by Daniel Shiffman, at the moment I've just started learning about friction and have had a go ...
1
vote
0answers
54 views

Modern way of getting points within a distance?

I'm making a game engine, and some components may want to interact with others based on distance. Currently, the component registers an update listener which runs on a loop, then it checks the ...
1
vote
0answers
39 views

Gauge vibration

Hello guys Im programming a gauge animation where there is a needle that points to certain values lets say each value equals to the amount of degrees the needle has to rotate to reach said value ...
3
votes
2answers
723 views

Why not derive velocity from position updates in games?

Is there a reason why retrieving velocity of a 3d object in a game engine vs deriving it from position updates is preferable? I am currently polling position at every step and deriving current ...
1
vote
0answers
37 views

Weird issue in collision resolution of non-static bodies

I'm a bit of a beginner in engine development, so I decided to write my own engine from scratch so I could learn more about what happens under everything. I've been progressing fairly well, except ...
1
vote
0answers
353 views

2D physics engine: Impulse based collision response with contact point manifold

I'm implementing a 2D physics engine where collision response is based on impulse computation. I'm going to first expose the context, then the problem, and finally the questions. Context Simple ...
1
vote
1answer
41 views

Can an unmodifiable 3D map be one large model or many small models?

Unmodifiable meaning that any ingame actions have no result on the terrain. Like in Source games. Question: Should I export one large model of the map, or should I split it into smaller chunks? If ...
0
votes
1answer
169 views

Calculating real time moment of inertia around arbitrary axis in 3d

I have a 3d rigid body consisting of multiple triangles forming a closed mesh. I know how to calculate the moment of inertia around an arbitrary axis by splitting up the mesh into simpler shapes and ...
0
votes
1answer
381 views

Looking for collision detection algorithms for broad and narrow phases between non-convex polyhedrons

I have some experiences on particle system simulation (namely DEM - Discrete element method), in which an individual particle with realistic shape (convex and non-convex) is approximated by gluing 3D ...
2
votes
0answers
169 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 ...
0
votes
1answer
334 views

Should a bowling game use a 2d or a 3d physics engine? [closed]

I'm creating a bowling game in flash+as3. I'm new to physics engines, so, to start I've begun to learn Box2D since I've heard it's one of the most popular physics game engines. Currently, I'm not ...
0
votes
1answer
280 views

How do I prevent a Box2d dynamic body from sticking to static body walls in zero gravity?

I'm still making this air hockey game. I have it mostly there now, but the dynamic body which is the puck always sticks to the walls (static body rectangles that form the border of the table). I read ...
2
votes
0answers
308 views

3D Physics Engine Collision Response: Solving Simultaneous Collisions via equation

I have been implementing a basic physics engine for a small game project I'm working on. It has very specific requirements, so I decided to try and write my own physics engine to meet them. I found ...
3
votes
1answer
84 views

How to detect and prevent the resolution of fake collisions?

I'm creating my own physics engine and I came across a small inconvenience. Here how it goes: when a body tries to push into something it really can't push, it gets pushed back (which is completly ...
0
votes
1answer
957 views

Integrating Unity physics with Entitas

I've used Entitas a bit and it appeared to me as a great way of creating clean, modular code. I've seen few examples of games created with this framework, and most of them were puzzles, TD's, simple ...
4
votes
2answers
722 views

What is inertia in a physics engine?

Inertia seems to be useful in a physics engine, so useful that even in Box2DLite, a demo of Box2D it hasn't been omitted. See this Body class from Box2DLite: ...
1
vote
2answers
456 views

Physics engine and squishing of stacked objects

I have a general question that seems to apply to most physics Engines (Box2D, Unity, Matter.js, …). I'm trying to make a tower of rectangular objects that are stacked on the [static/mass=infinity] ...
-5
votes
1answer
469 views

Quake Physics ported to Unreal Engine? [closed]

My eSport mod needs the Quake 3 physics -- as well as some modern engine features. Options are either: Quake Engine: Upgrade/develop new rendering,etc component(s) Unreal Engine: Port physics. ...
0
votes
1answer
129 views

Problem resolving rotation between sphere-sphere collision

I have developed a collision detector that return collision data, as collision normal, collision point, interpenetration, etc. And now I am developing a collision solver. The collision solver compute ...
3
votes
1answer
213 views

Rigid body falls through static mesh even though collision is detected

I'm using Jitter Physics to create a game. For testing, I have ball (a spherical rigid body) falling onto a small box-like mesh. The problem is that the ball falls straight through the floor, even ...
1
vote
1answer
34 views

How to throw b2body with various speed at fixed position?

Above image is for ref to better representation. I have box2d object and i know start point & end point position. Now i want to give any force or impulse such that b2body will first collide at ...
1
vote
0answers
53 views

Is this a correct way to solve contact?

Hi there, I'm learning the impulse based physics engine these days. Can someone please check my image about solving a contact( a sphere resting on ground) , and please let me know where is wrong. ...
0
votes
2answers
887 views

Circular soft body? Matter.js or other js engine?

I am using Matter.js physics in an attempt to create soft bodies. I was able to create a body like this: However I am not sure if this is the "soft body" I want. It is true that this body is not ...
1
vote
2answers
570 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 ...
1
vote
0answers
166 views

Physics fixed time step with client/server games

I'm trying to make a 2D platforming multiplayer game with client/server system. I want to use Node.js and Phaser for the display. I read a lot about fixedTimeStep : http://gafferongames.com/game-...
1
vote
0answers
107 views

(UE4) Simulate physics breaks timeline animation

I'm using timelines to animate my boat object, which does not have any limbs. So all I need to accomplish is rotation and a little movement. However, when the player dies, I need the boat to sink ...