# Tagged Questions

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.

309 views

### Moving a Box2D object in the direction it is facing using applyForce [duplicate]

I'm trying to apply force to a polygon physics object to move it. Whilst I can get it to move upwards easily enough, I'm trying to get it to move in the direction in which it is pointing. Here's my ...
391 views

### how can we define dynamic Path of ViewObject(Bitmap) On Canvas

I am Currently working on One 2D Android Game, In this game One ViewObject(Bitmap) is moving Across Screen On Parabola Path Like in this Image, But this Path is Static, the Static path is getting ...
92 views

### Ring and Pole - Box2d

How I can make a b2Body in box2d so that it could form a ring which does not collide from the center just like a ring. like when we flick the object and there's another body (like pole), the pole can ...
835 views

### Movement & Physics in an entity-component system

I'm currently playing around with entity-components systems and got started on the movement/collision/physics parts and would like to have some pointers! It's a basic 2D sidescrolling game, with the ...
2k views

### AndEngine - Moving Rectangle using Accelerometer

I'm learning how to create games with this great engine and I'm trying to put my knowledge in order to create a simple game. My first goal is to make a Rectangle moving using accelerometer and create ...
793 views

### How to simulate feather fall in box2d?

I am working with AndEngine with Box2d extension, but general answer or a concept idea will be appreciated too. I have feather-like objects in a 2D side view world that I want to be part of the ...
700 views

### “Car” movement in 2D dimension [closed]

I am searching for a simple tutorial how to add arcade car physics for my game. Exactly same user units behaviour i found in next games: Tank Hero: Laser Wars Death Worm: Video: ...
222 views

### Gravity independent of game updates per second

Edit Just for clarification, my sprite's 'movement' isn't the problem. If I set my Time variable to 4 seconds, then it will cross the screen in exactly 4 seconds regardless of logic updates rate per ...
753 views

### Calculating buoyancy force

I am trying to simulate a buoyancy force for objects submerged/suspended in a fluid in a 2D environment. According to Game Physics: Engine Development: How to Build a Robust Commercial-Grade Physics ...
339 views

### Throw object towards predefined place? [duplicate]

I have a 2D side-view game with object attributes such as x, y, speedX, etc. Now I want to throw a given object from any place on the screen onto a defined goal place, in such a way that its ...
140 views

### Collision and gravity problems

So this is an easy question. I need to implement gravity in my game but where I'm stuck is what variables do I need in my Entity object for the calculations and a good algorithm that I can use for ...
335 views

### Swarm/crowd movement with box2d?

Apart from using b2Body::setTransform(), are there other ways to move a body around while keeping its dynamics ? I want to move several bodies at the same time into one direction, pretty much like ...
362 views

### Realistic 2D Planetary Physics Engine?

I'm doing a spaceflight simulator in C++ (using Allegro 5), and I realised that I could just use a physics engine instead of writing my own physics. So that's what I'm doing. Since this is going to ...
152 views

### Moving Sprite With Physics Frame

Normally, a physics frame in pink (see image below) gives the body for detecting hit signal. It usually either falls down or lifts up depending on the gravity orientation. The question is: Is it ...
288 views

### Creating stable tentacle structures

I am using verlet integration to simulate some tentacles. So far it works great and I am satisfied with how it looks in general. Here is how a tentacle is built: The very stiff sticks are colored ...
357 views

### Why won't my Box2d bodies collide? [closed]

I'm doing something wrong when trying to get bodies to collide using jBox2d & Slick2d. Here is have just my basic init, update, and render methods. Render and update seem to work fine for drawing ...
352 views

### Fluid Particle Grid

So recently I have been looking at some fluid simulation techniques, specifically Smoothed Particle Hydrodynamics. One of the key components is a grid to avoid O(n^2) searches. I have been having some ...
295 views

### Making The Player Stop Bouncing And Stop Sinking In The Ground In A Platformer XNA

Heres a problem i've been having. I have a platformer, and whenever my player hits the ground he keeps bounding. Here's the falling code iceBoy.moveY++; iceBoy.position.Y += moveY; Now heres the ...
164 views

### limiting jump forces to achieve a maximum jump height [duplicate]

A player and the world are modeled using a physics engine. Jumping is modeled by applying a vertical upward force to the player's physics body when the jump button is pressed. The upward force is ...
124 views

### Bullets Spawning in same direction [closed]

I'm using XNA to make a Bullet Hell Shooter game, and I'm running into some troubles when I try to change the direction in which the bullets move. Been trying to debug for awhile, but haven't gotten ...
299 views

### Debug Render In Cocos2d Android

I want to implement debug render for cocos2d android.So I can view how bodies are created. Right now I use gdx.jar file for box2d and load that jar file following way. static { ...
154 views

### Problem with sensor in box2d [closed]

I have two bodies: one green static sensor (spikes) and one orange dynamic body (brick). I have bullet and it's a dynamic body too, but with bullet flag set. My problem is that when the bullet is ...
454 views

### Simple 2D hair simulation/manipulation

I would like to simulate very simple hair in a 2D environment, and will need to be able to "brush" the hair. What I want to do: A 2D character is facing squarely towards the player. The player can ...
85 views

### Checking bounds of a quad

I want to know how would I tell if a quad touches another quad in my game built in Slick2D. I have a class that I named "Bounds" which has 4 "Point" objects which just store an X and a Y value and a ...
394 views

### In 2d game logic, should I use pixels or world coordinates?

Currently in my game I handle the logic (collisions, movement) using pixels but I find it very limiting espiecially when thinking about variable speed. For example Box2D requires you to use ...
182 views

### Distribute circles evenly on Screen - circle packing

I want to evenly distribute a random amount of circles with random diameter on the screen for. This level doesn't scroll so the users screen resolution sets the limits. Further I would like the ...
162 views

### Physics movement prediction is way off [closed]

I'm making a simple, non-networked game. There are two players and a ball. In implementing the AI for the second player, I've run into a huge problem predicting where the ball will hit the ground. ...
590 views

### Whats the physics behind the doodle jump game?

I'd like to know how we can achieve the doodle jump type physics using andengine. I mean the character is not colliding with the ground blocks when he moves upwards but will collide when he came ...
130 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 ...
189 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 ...
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 ...
508 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: ...
479 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 ...
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?
129 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) { ...
470 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 ...
303 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); ...
862 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 ...
1k 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 ...
139 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 ...
136 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 ...
245 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 ...
264 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 ...
360 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 ...
293 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 () ...
207 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 ...
272 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 ...
604 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 ...