# Tag Info

Accepted

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

On handling floating point numbers in a deterministic way Floating point is deterministic. Well, it should be. It is complicated. There is plenty of literature on floating point numbers: What Every ...
• 18.5k

### In games physics engines, what is "tunneling", also known as the "bullet through paper problem"?

What is tunneling and why it happens In video games, physic objects will have an specific position which is updated by the physics engine each frame based on its velocity and any forces applied to it. ...
• 18.5k
Accepted

### Why integrate over accumulation?

...the inner workings of that function are generated via the appropriate mathematical formula... This will work for certain classes of problems, and the key phrase to search for is a closed-form ...
• 1,301

### Moving player inside of moving spaceship?

The ship stays in place and everything moves. Mostly. In this answer I present three ideas of how to go about it, and I'm referencing the games I'm basing them on. I could not find out what approach ...
• 18.5k
Accepted

### Why not derive velocity from position updates in games?

In the vast majority of situations, calling getVelocity is a vastly preferable approach. You don't have to be polling objects on the off chance that next frame you are going to need a velocity (which ...
• 1,197

### Why integrate over accumulation?

The problem with your approach is, that you don't have a history of your object. You can calculate the position if you move in a direction, but what happens if you hit something and bounce back? If ...
• 536

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

I work for a company which makes a certain well known real-time strategy game, and I can tell you that floating point determinism is possible. Using different compilers, or the same compiler with ...
• 191

### Why integrate over accumulation?

However, I don't understand why it's accumulated like this when it could just as easily be gotten by changing a function. For example: getPosition = makeNewFunction() which could return something that ...
• 803

### Why integrate over accumulation?

In the case of just a simple bouncing ball, coming up with closed form solutions is easy. However, the more complex systems tend to require solving an Ordinary Differential Equation (ODE). Numerical ...
• 1,197

### How do force fields scale?

This is what I do in my N-Body simulation: particles far away can be aggregated in combined cells on a grid. (Multi-resolution Grid.) I use gravity calculations, but I am sure that charged attraction/...
• 3,679

### What exactly is a physics engine?

The input it speed, mass, and time, the output is new speeds. Sometimes rotation/angular momentum is an input and output too. Essentially Physics engines try to simulate the effects of both gravity ...
• 9,927

### Sound Synthesis from object collision in Virtual Reality Environment

When you say 'synthesis' do you mean pure analog/additive/FM synthesis from scratch, or would a sample-based approach be acceptable? If you can't use combinations of real-world audio samples then this ...
Accepted

### physics engine without time steps

The problem is this only works if movement is linear and there is no possibility of other moving objects hitting one another. As soon as you have multiple forces changing the direction in non-linear ...
• 11.7k

### How do I fix objects "popping" or jittering in physics engine?

Your problem lies in the fact that you have no "resting" state for your bodies. Any physics system has an amount of energy, be that kinetic, thermal, and so on. In reality, solid object deform ...
• 2,555
Accepted

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

I most often encounter this in the context of Unity, which has the following attributes: Input is checked once per displayed frame, before any of that frame's fixed/variable timestep updates Input ...
• 114k

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

I'm not sure if this is the type of answer you're looking for, but an alternative might be to run the calculations on a central server. Have the clients send the configuration to your server, let it ...
• 767
Accepted

### Rigidbody physics concept: Why translate collision shape on-the-fly instead of mutating it?

One major advantage is that many collision detection operations are more efficient when performed at the origin. A classic example is box vs sphere. When done in a box's local space the tests are very ...
• 3,022

### What exactly is a physics engine?

Typically a physics engine is used to make object in a game behave in a realistic manner relative to their environment without having to design specific animations for every possible scenario. ...
• 151

### What exactly is a physics engine?

A physics engine is responsible for simulating the motion of objects in "the world" (whatever that means in the context of the engine). Most physics engines nowadays use Newtonian mechanics to do this,...
Accepted

### What is inertia in a physics engine?

I believe what we're looking at here more specifically refers to rotational inertia and inverse rotational inertia; not to linear inertia (nor inverse linear inertia). Wikipedia explains that ...

### Should a bowling game use a 2d or a 3d physics engine?

When developing games it is important to separate the game mechanics from the game representation on the screen. The game mechanics of bowling can be simplified to a pure 2d simulation by looking at ...
• 112k

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

There are almost no algorithms to detect collision with a concave object, because there's no reason to have one. Every concave object can be approximated with convex object. See the following image ...
• 14.5k
Accepted

### Difference between _process(delta) and _physics_process(delta)?

Graphics or Physics One difference is that _process is tied to graphics (it runs once per frame), while _physics_process isn't. ...
• 18.5k

What you should optimize for is probably best shown in and around slide 40 of this presentation: http://www.slideshare.net/cellperformance/gdc15-code-clinic The idea is to prevent the code from doing ...
• 3,578
Accepted

### multiple contacts for SAT collision detection

When performing OBB-OBB intersection using SAT, the suggested approach for generating multiple contacts is to find the coincident features and perform clipping - either edge against edge, or face ...
• 3,022
Accepted

### How do I calculate rotational impulses in rigid body collisions?

You're in luck. I did a full translation of Randy Gaul's 2D physics engine into C# and XNA. He hasn't really explained things well for beginners like me. For your answer, you should just multiply ...
• 872

### How do I calculate rotational impulses in rigid body collisions?

Whatever collision be, angular momentum is conserved. ie Iw = constant with the coefficient of restitution (in translation, i dont know if its said the same in rotation) u define, and with the moment ...
• 183