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

learn more… | top users | synonyms

1
vote
1answer
135 views

Increase restitution (bounciness) of an object in a JavaScript formula

I'm going slightly around the houses on this one. I originally started a thread over on Stack Overflow about it but then it seemed to diverge into mathematics, with no joy from the SO community over ...
1
vote
2answers
192 views

Collision detection for Monotouch [closed]

What I want to have for my Monotouch 2D projects: simple collision detection and collision polygons working with UIViews Sounds simple, isn't it? I've evaluated a lot of engines available on the ...
12
votes
3answers
2k views

Resolving a collision with forces

In my 2D physics engine, I can detect AABB vs AABB collisions, and resolve them by finding the shortest penetration vector and adding it to the AABB's position. Doing this "pushes" the first AABB ...
5
votes
2answers
538 views

Ball bouncing infinitely and constantly

Alright, so I've got hold of some simple physics mechanics, and am currently trying to implement bouncing. Based on the first answer of this question, I've developed the following algorithm: ...
1
vote
1answer
518 views

Collision detection against specific sprite shape using XNA with Farseer Physics?

I am making a 2D XNA Game, using Farseer Physics for collisions. I need collisions to be resolved against the actual shape of the sprite image, ignoring transparent pixels, rather than against the ...
-2
votes
1answer
119 views

Help finding a good XNA physics library? [closed]

I'm looking for a good physics library for XNA. Can anyone help me find something good, simple and easy to learn for XNA?
3
votes
1answer
139 views

What to do after detecting OBB-OBB intersection

I'm using this code to detect intersections between two OBBs. The problem is that i don't know what to do after detecting it. I tried using a simple algorithm: if (collision detected) { ...
1
vote
2answers
554 views

Find the Contact Normal of Rectangle Collision

It seems a lot of people have asked similar questions on this site, and every time it seems like a whole bunch of answers that don't work are given. Basically, I have two rectangles (AABBs) that ...
1
vote
1answer
326 views

Am I implimenting a sweep and prune broadphase correctly? [closed]

The code that I am using is: std::vector <PhysicsBody*> physicsChildren; //containing all objects ... std::sort(physicsChildren.begin(), physicsChildren.end(), sortByLeft); ...
2
votes
2answers
946 views

Non-physics character movement in a Box2d Environment

I am in the process of creating a physics platformer. However, I want the player movement to feel very old-school(as in: non-physics like), which means that the character: Should always move equally ...
9
votes
2answers
2k views

How can I make a character walk on uneven walls in a 2D platformer?

I want to have a playable character who can "walk" on an organic surface at any angle, including sideways and upside-down. By "organic" levels with slanted and curved features instead of straight ...
0
votes
1answer
141 views

Separating Axis Theorem fails at certain angles

I'm currently attempting to add an overlap tester for an axis aligned and orientated bounding box but the solution only seems to work accurately when the OBB's angle is between -10 and +10. As the ...
0
votes
2answers
140 views

Circle Collision class not positioning itself correctly

Ok I am using unity3D and the Futile framework. I have everything drawing and working correctly with Futile, but I am trying to attach a circle collision class to the FSprite that I have. I must be ...
1
vote
1answer
255 views

What physics engine support force fields and bodies represented as points?

I need a game engine that supports force fields in 2d or 3d, but suitable for 2d calculations, like bullet. Each body I want to simulate is represented as a set of points. Each point has positive ...
-3
votes
1answer
272 views

Implementation of planets in top-down space shooter [closed]

I am working on a top-down space shooter, and I have come to the point where I need some input on a mechanic. I have implemented enough that I can make this choice; either way will not change the code ...
2
votes
1answer
378 views

RK4 integration and Continuous Collision Detection

I'm using this method to detect collision between two AABBs. The algorithm is simple, fast and works great. It uses the relative velocity between the two objects to calculate TOI. This works fine with ...
8
votes
1answer
305 views

Calculate bike heading from front wheel heading and velocity

I have a simple top down bike game that I'm trying to add steering to. I would like to know how I use the heading of the front wheel to determine the heading and velocity of the bike. void Update () ...
5
votes
1answer
213 views

Physics/Logic behind self-bounce

I have a game that I am currently working on and I have a problem. What would a ball look like when it makes itself bounce. Say, for example that the ball had its own "inner power", was made out of ...
7
votes
1answer
276 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 ...
9
votes
3answers
638 views

Impulsioned jumping

There's one thing that has been puzzling me, and that is how to implement a 'faux-impulsed' jump in a platformer. If you don't know what I'm talking about, then think of the jumps of Mario, Kirby, and ...
3
votes
1answer
374 views

2D Smooth Turning in a Tile-Based Game

I am working on a 2D top-view grid-based game. A ball that rolls on the grid made up of different tiles. The tiles interact with the ball in a variety of ways. I am having difficulty cleanly ...
2
votes
5answers
2k views

How to Make Objects Fall Faster in a Physics Simulation

I used the collision physics (i.e. Box2d, Physics Body Editor) and implemented onto the java code. I'm trying to make the fall speed higher according to the examples: It falls slower if light object ...
2
votes
2answers
272 views

Procedural generation of physics-enabled structures (in a 2D world)

Is it possible to procedurally generate stable structures out of rigidbody objects at a reasonable runtime speed? Imagine Angry Birds's levels kind of structures but generated procedurally.
1
vote
1answer
239 views

What is going on in this SAT/vector projection code?

I'm looking at the example XNA SAT collision code presented here: http://www.xnadevelopment.com/tutorials/rotatedrectanglecollisions/rotatedrectanglecollisions.shtml See the following code: private ...
1
vote
3answers
442 views

Implementing distance joint

I would like to implement something that behaves much like a distance joint / revolute joint in Box2D, however I do not want to throw a whole physics engine at this problem. I'm curious where I might ...
4
votes
4answers
679 views

Point of contact of 2 OBBs?

I'm working on the physics for my GTA2-like game so I can learn more about game physics. The collision detection and resolution are working great. I'm now just unsure how to compute the point of ...
2
votes
3answers
344 views

Writing an autopilot for a 2d game with newtonian physics

The subject says it all. I am making a 2d space game with newtonian physics and I need pointers on how to write an autopilot for it. The requirements are best explained by an example. There is a ...
1
vote
1answer
220 views

Game Physics: Implementing Normal Reaction from ground correctly

I am implementing a simple side scrolling platform game. I am using the following strategy while coding the physics: Gravity constantly acts on the character. When the character is touching the ...
2
votes
1answer
649 views

What's the best way to handle slopes for a platfomer game using Box2D

I would like to know if there is any known solution for handling the player's movement on slopes using Box2D engine. I tried to do it using a circle as the player. Everything was fine until I tried ...
5
votes
3answers
661 views

'Spring' physics

I'm trying to put together a struct or a method of some sort that will allow me to check the relative position between two objects, and if they're too far apart, apply a force that will draw them ...
3
votes
1answer
2k views

Nape physics - Moving a body

Hey I'm currently getting started with physics engines and I set up a body (box shaped) which represents my character. Question: Which methods can I use to move a Nape.Body aka my char? I tried so ...
0
votes
2answers
597 views

Circle physics and collision using vectors

This is a problem I've been having, When making a set number of filled circles at random locations on a JPanel and applying a gravity (a negative change in the y), each of the circles collide. I want ...
3
votes
3answers
861 views

Moving a body in a specific direction using XNA with Farseer Physics

I have a custom polygon attached to a body, which looks like this: What I am trying to accomplish is getting the body to move according to wherever the tip of the body is. So far this is what I've ...
2
votes
3answers
2k views

Game physics / 2D Collision detection AS3

I know there are some methods you can use like hittestPoint and so on, but I want to see where my movieclip colliedes with another another movieclip. Any other methods I can use? by any chance does ...
6
votes
3answers
657 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 ...
4
votes
2answers
399 views

Detecting a ledge in Box2D [duplicate]

Possible Duplicate: Detect Open Space in Farseer How do I detect ledges? I'm making a 2D platformer with Box2D. The player needs to be able to grab onto a ledge and pull him/herself up. ...
2
votes
2answers
439 views

One-way platform collision

I hate asking questions that are specific to my own code like this, but I've run into a pesky roadblock and could use some help getting around it. I'm coding floating platforms into my game that will ...
4
votes
1answer
1k views

Friction in 2D game

I'm developing a 2D platformer, although this question could probably apply to just about any 2D type physics; What is the equation for friction? I have sort of a hacky type of friction set up in my ...
5
votes
1answer
436 views

2D Magnet-like repelling behavior

If somebody wanted to develop a system between two intersecting rectangles so that the rectangles would, in a gradual process, push eachother away from one another until no longer intersecting, with ...
1
vote
1answer
354 views

Ideas for 2d fire simulation [closed]

I want to simulate a fire in a flat and non flat* surface (fire spread modelling). I've seen that cellular automata is one of the algorithms that can be used. Are there other algorithms that would be ...
1
vote
1answer
188 views

2D Physics Engine to Handle Shapes Composed of Multiple Densities XNA

The game I'm working on involves shapes that might be composed of multiple materials in a variety of ways. Let's just take for example a wooden rod with and sizable tip of iron or say a block composed ...
2
votes
1answer
906 views

Collision Detection for a 2D RPG

First of all, I have done some research on this topic before asking, and I'm asking this question as a mean to get some opinions on this topic, so I don't make a decision only on my own, but taking ...
1
vote
2answers
134 views

How to fetch only the sprites in the player's range of motion for collision testing? (2D, axis aligned sprites)

I am working on a 2D sprite game for educational purposes. (In case you want to know, it uses WebGl and Javascript) I've implemented movement using the Euler method (and delta time) to keep things ...
3
votes
1answer
622 views

Creating a frozen bubble clone [closed]

This photo illustrates the environment: http://i.imgur.com/V4wbp.png I'll shoot the cannon, it'll bounce off the wall and it's SUPPOSED to stick to the bubble. It does at pretty much every other ...
5
votes
2answers
478 views

Multiple collisions within a single frame cycle?

So say you want to simulate several objects in two dimensions, just bouncing around in a finite space. Using AABB and sweep tests, it shouldn't be that complicated to calculate single collisions ...
3
votes
1answer
437 views

2D Motocross physics

I'm looking into making a 2D motocross bike game with plausible physics. It should look like this: For a first try, I've created only the player (a motocross driver) and the map (consisting of ...
2
votes
1answer
444 views

android game-logic for shooter

Im creating a 2d game for android. I'll just get right to it. I have a sprite controlled by a joystick that needs to shoot, sofar Ive managed to get direction and movement on my bullet, but then I ...
1
vote
1answer
294 views

Stopping an object after applying an impulse or force?

I'm having a small issue where after applying an impulse or force it is impossible to actually get an object to stop, i.e. a velocity of zero. This code is run every 1 / 60 of a second: void ...
9
votes
1answer
1k views

What is the difference between an impulse and a force related to a physics engine?

What is the difference between an application of an impulse and an application of a force in relation to a physics engine?
1
vote
1answer
2k views

Vector movement in space type game (Mouse rotation)

I'm having an issue with my movement in my 'game' prototype. It's basically not working and admittedly my knowledge with vectors is lacking. The issue I'm running into is that the ship won't move in ...