# 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.

182 questions
Filter by
Sorted by
Tagged with
167 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 ...
24 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 ...
203 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 ...
527 views

### How to get the point of collision in Separating Axis Theorem?

I'm interested in the relatively precise point (not line) of collision for calculating angular velocity on impact for use in a impulse calculation. At first I thought, perhaps naively, that I could ...
317 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 ...
493 views

### How would joints work in an impulse-based physics engine?

I want to learn about physics engines, especially impulse-based ones. So I've followed along this tutorial to create some simple rigid-body physics: http://gamedevelopment.tutsplus.com/tutorials/how-...
96 views

### AABB Collision Detection Confusion

I am trying to understand and implement AABB collision to learn simple 2D game physics. I'm following a tutorial and its method is a bit different to other websites. It uses the center of the object ...
51 views

### how can I visually compensate for latency in a diep.io style game

implementing extrapolation using linear velocity, orientation and position like on here gafferongames.com/post/state_synchronization/ I'm a little confused if I want to extrapolate from a known ...
83 views

### Can I use the 2d physics engine in a 3d game (or viceversa) in Unity?

This is entirely for performance. The 2D physics are less expensive, but I require 3D for some scenes. I never need both at the same time. I know you can have 2D with an orthographic perspective in a ...
42 views

### Simulating circular motion with gravitational forces in Unity2D

I am currently messing around with a game where you control a black hole and use its gravity to fling planets at targets. I have the gravity calculations working pretty well when the planets start out ...
33 views

### RigidBody Collision Handling with Verlet Integration

Hi I'm reading the Jakobsen Paper "Advanced Character Physics" which explains how the verlet integration along with a tetrahedron (4 particles) can form a structure usable for rigidbody (with 6 length ...
40 views

### Calculating approximations of support/forces between objects in Unity

I'm looking for ways to calculate how much a given object supports another in a scene. For example, imagine a box is on a table. In this situation we may say the table provides support to the lamp (...
7k views

### How can I perform a deterministic physics simulation?

I'm creating a physics game involving rigid bodies in which players move pieces and parts to solve a puzzle/map. A hugely important aspect of the game is that when players start a simulation, it runs ...
25 views

### Numerical errors in Player collision offset causing player to fall through the ground the next frame, how to avoid?

I'm trying to implement player physics with arbitrary objects, in this case, a bunch of cubes. I wanted to add a "floor" so in my cube collision function, I added the following following lines: <...
662 views

### Friction due to gravity in an impulse based physics engine

In my physics engine, I'm using impulses to solve collisions. I'm basing all calculations on these equations: ...
39 views

### Implement MMO like character movement without a full-fledged physic enginge?

Question: How can I implement World of Warcraft / Guild Wars 2 / etc like player movement, including jumping, without using a full-fledged physic system for my multiplayer game since players only ...
52 views

### Objects aren't rotating in sync

This is a follow-up question to How to reapply force applied to one object to another object I want to make two objects move, react to collisions and other stuff as if they were one. For example, ...
63 views

### How do I prevent falling tiles from bouncing on each other in my match 3 game?

I am working on a match 3 game in Unity. The tiles have a RigidBody2D in dynamic mode and a BoxCollider2D. When a match occurs ...
40 views

### How to reapply force applied to one object to another object

Edit: While I wasn't able to make the code work completely, I believe my question has been sufficiently answered. I want to make two objects move, react to collisions and other stuff as if they were ...
71 views

### Faster convergence in a physics engine

I've got my hands on the first edition of the book Game Physics Engine Development: How to Build a Robust Commercial-Grade Physics Engine for your Game by Ian Millington. Because I didn't really know ...
120 views

### How to handle player input with fixed rate variable fps time step?

I've made a system which uses the ideas from "Fix your Time Step" in order update physics. I'm having trouble finding standard methods for dealing with this when user input affects player movement ...
231 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 ...
27 views

29 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 ...
499 views

### Understanding constant acceleration in terms of game physics simulation

There are various integration methods that can be used for games. I am trying to write a simple physics engine deciding between semi-implicit Euler and Verlet variants. What I don't understand is ...
2k views

### Calculating impulse with multiple collision points

In my amateur 2D rigid body physics engine for a game I react on collisions between two bodies with an impulse j (formula 11) as explained here. To calculate this impulse I need one contact point P ...
37 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 ...
178 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 ...
3k views

### How to build a bones animation engine?

I want to develop a flash game. It would draw a stick man, and edit his pose. I think what I need to learn are bones animation and physics engine. Can anyone introduce some good resources to learn ...
34 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 ...
105 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 ...
626 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] ...
1k views

### Physic engine for snooker/billard game [duplicate]

Possible Duplicate: Is there an algorithm for a pool game? I think most billard/snooker games have a lot of problems with their physic engines. They are far away from realistic and you can't ...
108 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: ...
9k views

### How to achieve highly accurate car physics such as Liveforspeed?

Liveforspeed is a racing simulator, there is amazing amount of realistic physics. for example, tires get warm, tire actually deforms when you turn corners. You need to play this game with a mouse at ...
923 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: ...
400 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 (...
52 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 ...
187 views

### Wall collision response results in jittery physics

I have the following game loop : ...
124 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 ...