Relating to the motion of objects through space and time. Including concepts such as acceleration (thrust and gravity), mass, collision response, friction and more.

learn more… | top users | synonyms

7
votes
6answers
620 views

Physics library internals

I've seen box2d and bullet ports into javascript, but neither of them attracted me particularly, except by source code. It all seemed, after all, quite simple once I looked inside them. But what are ...
7
votes
4answers
1k views

Making a Box2D ball bounce to constant height

I want to create a game like Doodle Jump. I'm using libgdx and Box2d. I needadvice on how to make my ball bounce constantly and with the same height. I've tried setting the ball's body restitution ...
7
votes
2answers
5k views

Typical Maximum steering angle of a real car

I'm building a car sim in Unity3D. I'm trying to set the properties of the car to be as realistic as possible. I can't seem to get a straight answer on Google so I thought of asking here. What is the ...
7
votes
2answers
1k views

How can I factor momentum into my space sim?

I am trying my hand at creating a simple 2d physics engine right now, and I'm running into some problems figuring out how to incorporate momentum into movement of a spaceship. If I am moving in a ...
7
votes
1answer
1k views

A simple flight simulator

In a 3D flight simulator with a Crimson Skies level of realism (as in, arcade level rather than realistic), how do you determine the movement of an aircraft each game clock tick? (Crimson Skies is an ...
7
votes
4answers
606 views

How do I make a vehicle move to a point and stop without overshooting or oscillating?

Ok so consider we have a vehicle like the one I described in my answer to this question, with a 2D position, velocity, angular velocity, and drag/friction. It can accelerate and break by a variable ...
7
votes
1answer
523 views

Differential programming for a vehicle

I am to a point on my vehicle where, when im going fast and turning, the vehicle acts weird because the inside tires are moving faster than the outside tires. So i need to figure out how to program in ...
7
votes
3answers
287 views

How to take into consideration gravity when moving AI

I'm making a 2D game. There is currently a helicopter flying around, controlled by the player. It's controlled using the arrow keys: UP, LEFT and RIGHT. It's speed along the y axis is dy, and speed ...
7
votes
3answers
2k views

Physics not synchronizing correctly over the network when using Bullet

I'm trying to implement a client/server physics system using Bullet however I'm having problems getting things to sync up. I've implemented a custom motion state which reads and writes the transform ...
7
votes
4answers
1k views

Server-side physic simulations with hundreds of players

I’m currently working on a singleplayer physics-orientated game where I would like the physics to be simulated server-side. This because the game will have leadersboards, persistant player ...
7
votes
4answers
15k views

2D character controller in unity (trying to get old-school platformers back)

This days I'm trying to create a 2D character controller with unity (using phisics). I'm fairly new to physic engines and it is really hard to get the control feel I'm looking for. I would be really ...
7
votes
1answer
315 views

RK4, Derivatives, Understanding Game Physics

Gafferon Games has a great article on RK4 Integration for building physics simulations which can be found here: Integration Basics Personally my mathematics and physics knowledge could use ...
7
votes
3answers
2k views

Finding the contact point with SAT

The Separating Axis Theorem (SAT) makes it simple to determine the Minimum Translation Vector, i.e., the shortest vector that can separate two colliding objects. However, what I need is the vector ...
7
votes
2answers
361 views

How does braking assist of car racing games work?

There are a lot of PC car racing games around which have this unique driving assist which helps brake your car so that you can safely turn it. While in some games it just an 'assist', it will just ...
7
votes
1answer
217 views

Determining whether two fast moving objects should be submitted for a collision check

I have a basic 2D physics engine running. It's pretty much a particle engine, just uses basic shapes like AABBs and circles, so no rotation is possible. I have CCD implemented that can give accurate ...
7
votes
2answers
2k views

How to resolve penetration of two colliding bodies

I've implemented simple 3D game physics engine. I already have decent collision detection in place, now I'm trying to figure out the collision response part. I'm using impulse based method to ...
7
votes
2answers
344 views

How to implement a tractor beam?

I'm working on a game where the player can pick up objects using something like a tractor beam, and carry them around. Attracting the object towards the center of the beam is not difficult. But once ...
7
votes
1answer
271 views

How do engines avoid “Phase Lock” (multiple objects in same location) in a Physics Engine?

Let me explain Phase Lock first: When two objects of non zero mass occupy the same space but have zero energy (no velocity). Do they bump forever with zero velocity resolution vectors or do they ...
7
votes
1answer
783 views

Bringing a Box2D, Physics Enabled game Online?

Lets say, to simplify the problem of online games a bit, my goal would be to run a near identical simulation on multiple computers in sync. Would sending commands be a good idea? Now if only sending ...
7
votes
2answers
508 views

multiplayer networking with physics

I'm curious how multiplayer networking with physics is implemented in racing games. We have a physical world with multiple fast-moving vehicles controlled by different people. Let's say that vehicles ...
6
votes
5answers
2k views

Why do objects interpenetrate in this simple collision solver?

The code below is from a Microsoft XNA sample here. This is quite a simple rigid body simulation that ignores many physical effects (such as angular momentum), but it does try to push objects ...
6
votes
3answers
367 views

How can I change the acceleration of an object to arrive at a particular time?

I'm trying to write some code to change an acceleration factor so a ball will arrive at a destination in a desired time. The problem is I don't know time (t) but I do know I want it to arrive at (t - ...
6
votes
3answers
620 views

How do I make a moving object stop smoothly at the end of a path?

There are a dozen ways I could word this question, but to keep my thoughts in line, I'm phrasing it in line with my problem at hand. So I'm creating a floating platform that I would like to be able ...
6
votes
1answer
815 views

How do I detect ledges?

In my game, I'd like my character to be able to grab and hold onto ledges, and to be able to pull themselves up if there's room to do so. How do I detect if there's a ledge, and if the character has ...
6
votes
1answer
574 views

How to do collision detection for fluids in 3D? [closed]

Is there an algorithm or a technique which can detect the collision between 3D fluids? I currently treat my fluids as dynamic meshes. Is it possible to find collisions with these, or will I need a ...
6
votes
4answers
579 views

Sharing data between graphics and physics engine in the game?

I'm writing the game engine that consists of few modules. Two of them are the graphics engine and the physics engine. I wonder if it's a good solution to share data between them? Two ways (sharing ...
6
votes
2answers
264 views

Self-righting agents that have fallen over

I need insect-like agents that have fallen/rolled on their back/side to naturally re-orient themselves. The agents are modeled as simple cuboids in the physics engine (Bullet) to approximate an ...
6
votes
2answers
2k views

How to calculate the exit speed of ball bouncing off a solid surface

Hey all, I am working on a simple game to include some rigid body dynamics, involving placing (moving & rotating) some springs to bounce a falling ball into a target area. My problem is correctly ...
6
votes
2answers
4k views

how to ignore physics collision of some objects in box2d

I know this sounds silly but I would like some objects to follow physics while others not to collide each other. I tried to achieve them by setting their position exclusively. But then it will ...
6
votes
1answer
1k views

Character bouncing off ground due to gravity

Implementing gravity in the game, the character keeps bouncing up and down slightly when he hits the ground, upon debugging the character is essentially bouncing on and off the ground. Not quite sure ...
6
votes
2answers
434 views

Is it possible to have concurrent collision detection where every entity acts at exactly the same time?

There are many algorithms that can be used for collision detection. In many cases we check for an overlap in coordinates of an entity. If we make a triangle a,b and c. We have 2 entities at a and b ...
6
votes
2answers
2k views

Get collision details from Rectangle.Intersects()

I have a Breakout game in which, at some point, I detect the collision between the ball and the paddle with something like this: // Ball class rectangle.Intersects(paddle.Rectangle); Is there any ...
6
votes
2answers
640 views

Show path of a body of where it should go after linear impulse is applied

I am making a game with Andengine and Box2D. I have a dynamic body and I apply linear impulse on the body to move it around when the user have touched the screen. Now I want to show the path where ...
6
votes
2answers
427 views

Elliptical orbit modeling

I'm playing with orbits in a simple 2-d game where a ship flies around in space and is attracted to massive things. The ship's velocity is stored in a vector and acceleration is applied to it every ...
6
votes
1answer
240 views

How do I change the speed of an object without changing path travelled?

I have a ball which is being thrown from one side of a 2D space to the other. The formula I am using for calculating the ball's position at any one point in time is: x = x0 + vx0*t y = y0 + vy0*t - ...
6
votes
1answer
1k views

How does 2D Game Physics work? [duplicate]

Possible Duplicate: How do I build a 2D physics engine? If we take the game Angry Birds that had big success lately I were thinking how do they implement the physics in a game like that? ...
6
votes
1answer
248 views

How can I derive force vectors from velocity vectors?

I'm making a 2d shooter ala Geometry Wars. I've got my own simple physics at work driving the background grid and all my entities. To move anything in the world I apply a Vector2d force to it. The ...
6
votes
1answer
305 views

2D Polygon Triangulation

I am creating a game engine using the JBox2D physics engine. It only allows you to create polygon fixtures up to 8 vertices, To create a body with more than 8 vertices, you need to create multiple ...
6
votes
2answers
497 views

Collision Detection/Response in Vector-based levels

I have a 2D side scroller whose levels are stored as vectors (that is, a bunch of lines) which looks like this: How would I detect that I'm colliding with one of these lines, and react accordingly ...
6
votes
3answers
343 views

Calculating impulse propagation through a rigid body after a collision

I'm working on a game. I need to work out what the impulse is at different points on a body as a result of a collision. For example, in the following diagram, if there is a collision that results in ...
6
votes
2answers
2k views

How to implement friction in a physics engine based on “Advanced Character Physics”

I have implemented a physics engine based on the concepts in the classic text Advanced Character Physics by Thomas Jakobsen. Friction is only discussed very briefly in the article and Jakobsen himself ...
6
votes
3answers
2k views

Is there a good existing starting point for realistic 2d racing car physics?

I'm trying to get a realistic behaving racing car into my 2d top-down game. Making a very simple car that drives around is straight forward but I want a reasonably sophisticated model that models ...
6
votes
1answer
263 views

Changing orientation by applying torques

Suppose you've got an object floating freely in space. You have a vector you want this object to point towards, and a vector representing the direction it's currently facing. From these two, you can ...
6
votes
1answer
251 views

How do I make a slot car game?

I new to game development with Unity and my first project is a slot car racer. For a realistic slot car-like-driving experience, I first build a track with a channel in the track and a pin on the car. ...
6
votes
3answers
583 views

Need physics algorithm for modeling ceiling collapse in voxel-based game

I'm looking for algorithms on how to model the physics of cave-ins/collapses for a game idea I am working on. The game allows the player to extensively mine 3D voxel-based asteroids, and I want areas ...
6
votes
2answers
637 views

“Super meatboy”-ish replay

I'm making a platformer built from mini-levels - and I want to create a sort of a replay of all the player tries that the player did for the level. My question is - what is the best way to record the ...
6
votes
2answers
2k views

How can I implement rectangle collision response?

I am working on a game in JavaScript and my current implementation of collision uses the shortest distance to push the intersecting object away, which isn't always correct. I've made this diagram of ...
6
votes
1answer
127 views

How can I predict player-to-projectile collisions in Box2D?

I'm making a real time shooting game with Box2D as the physics engine. The gameplay is mostly about trajectory, like Angry Birds. I want to make a slow motion effect and move camera to the player when ...
6
votes
1answer
250 views

Looking for very simple implicit integration example

I am trying to design a robust cloth system. I have no problem at all simulating things like that using forward integration such as euler, midpoint, runge-kutta, verlet, etc. However, I just can't ...
6
votes
2answers
201 views

Timestep schemes for physics simulations

The operations used for stepping a physics simulation are most commonly: Integrate velocity and position Collision detection and resolution Contact resolution (in advanced cases) A while ago I ...