0
votes
0answers
24 views

How to handle car game circuits in a top-down view?

I'm already using a physics engine (box2d) but i have no idea about how should I implement circuit's path with wall collision. I tought about checkpoints but this doesn't solve the wall collision.
0
votes
1answer
89 views

Swinging a sword in Xcode with Sprite Kit

I'm working on making an RPG in Xcode, and I'm having a major gameplay issue when it comes to having my character swing his sword in a way that is realistic and gameplay compatible. Right now, when ...
1
vote
2answers
99 views

How to detect collision on specific part of the sprite node

I have a spike and a ball is falling down, when the ball touches the top point of the spike, I want to make the ball invisible, and when it touches on the other part i.e on the sides I don't want to ...
0
votes
1answer
49 views

Trajectory Projectile with Collision Detection

Right now I am trying to create projectile for cannon in which I want to detect collision also. At present I have simple working projectile after using two references Unity – How to display ...
1
vote
1answer
53 views

Sprite Kit - containsPoint for SKPhysicsBody?

I have a ball bouncing around the screen. I can pick it up and drag it onto a "bucket". When my touches finish, I use the containsPoint function to check and see if I have dropped the ball onto the ...
-1
votes
1answer
62 views

simple collision detection with box2dweb

im beginner in box2dweb that version of box2d for javascript i wrote simple gravity system and i want to detect the collision between the box and the ground , when the falling box hit the ground ...
1
vote
0answers
59 views

Storing rigid body collision shapes in local or world coordinates

I'm writing the beginnings of a lightweight 2d rigid body engine (in javascript, as a hobby project), and i'm debating whether to store collision shapes in local or in (updated as needed) world ...
1
vote
1answer
75 views

Calculating the point(s) at which two moving objects are a certain distance from each other

Problem This is similar to a Closest Point of Approach calculation, but instead of the closest point(s), I want the points at which the objects are a given distance away from each other. (Imagine two ...
3
votes
1answer
107 views

Calculate point of circle–circle collision between frames

I need to find the exact XY coordinate where a circle collides with another circle calculated between frames. This means that I take the coordinate of the moving circle on the previous frame and take ...
2
votes
1answer
93 views

How to impale and stack targets correctly according to the collider and its coordinate?

I'm making another simple game, a catch game, where a spawning target game object must be captured using a skewer to impale it. Here how: At the start, the falling object (in red) will fall in a ...
3
votes
1answer
97 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 ...
4
votes
1answer
218 views

How do I simulate a trampoline?

I'm quite new to game development. I was pretty impressed with the elastic effect I saw in this flash game when the ball hits the trampolines and I'm wondering how to recreate it. I've done some ...
1
vote
2answers
169 views

Collision detection via adjacent tiles - sprite too big

I have managed to create a collision detection system for my tile-based jump'n'run game (written in C++/SFML), where I check on each update what values the surrounding tiles of the player contain and ...
-3
votes
1answer
163 views

Simple collision detection implementation [closed]

I'm making a game with C++ where the program extracts the lines out of an image (via openCV), stores them in an std::vector< std::vector< int > > and the builds a tile map out of it which is ...
0
votes
0answers
467 views

Slope polygon collider 2D causing box collider 2D to 'bump' while sliding on it

I'm doing procedural terrain generation. So far I've created the mesh, and attached a 2D polygon collider to it. The terrain is made up of hills going up and down. After doing so, I put a 2D rigid ...
0
votes
1answer
371 views

OBB Collision Resolution: Jittering with Long Rectangles

I have been working on a physics simulation module. Almost everything works properly, but I am having an issue, which I have demonstrated in the following video. http://youtu.be/2L17y9Lme0Q As you ...
1
vote
1answer
164 views

AABB vs Rectangle

I'm trying to wrap my head around 2D physics and stumbled upon Axis Aligned Bounding Boxes, and I have a couple of questions regarding them. In all AABB structs I could find out there, people prefer ...
3
votes
3answers
396 views

2D game with 3D collision?

How do they do this bounce? Looks awfully complicated in 2D.
3
votes
1answer
336 views

Sensor based vs. AABB based collision

I'm trying to write a simple collision system, which will probably be primarily used for 2D platformers, and I've been planning out an AABB system for a few weeks now, which will work seamlessly with ...
0
votes
2answers
84 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 ...
5
votes
2answers
573 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 ...
12
votes
3answers
1k 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 ...
1
vote
2answers
439 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
295 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
1answer
355 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 ...
4
votes
4answers
634 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 ...
0
votes
2answers
548 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 ...
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 ...
2
votes
1answer
834 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
132 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 ...
5
votes
2answers
457 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
3answers
246 views

Physics System ignores collision in some rare cases

I've been developing a simple physics engine for my game. since the game physics is very simple I've decided to increase accuracy a little bit. Instead of formal integration methods like fourier or ...
9
votes
2answers
1k views

What is the best way to handle simultaneous collisions in a physics engine?

I'm writing a 2d physics engine in javascript so that I can learn more about physics in video games. I have it working correctly for rigid body collisions, except for if any body collides with two or ...
4
votes
1answer
1k views

How can I convert a 2D bitmap (Used for terrain) to a 2D polygon mesh for collision?

So I'm making an artillery type game, sort of similar to Worms with all the usual stuff like destructible terrain etc... and while I could use per-pixel collision that doesn't give me collision ...
3
votes
2answers
424 views

Collisions between moving ball and polygons

I know this is a very typical problem and that there area a lot of similar questions, but I have been looking for a while and I have not found anything that fits what I want. I am developing a 2D ...
6
votes
3answers
3k views

Implementing Separating Axis Theorem (SAT) and Minimum Translation Vector (MTV)

I was following codezealot's tutorial on SAT and MTV and trying to implement it myself but I've come a cropper when it comes to getting the correct MTV. Here is my example: (Cue pretty pictures...) ...
1
vote
0answers
219 views

Debugging Minimum Translation Vector

I implemented the minimum translation vector from codezealot's tutorial on SAT (Separating Axis Theorem) but I'm having an issue I can't quite figure out. Here's the example I have: As you can see ...
2
votes
1answer
2k views

Farseer Physics collision detection vs intersection detection with sensors

I'm trying to make a game that uses Farseer physics engine as its main collision detection engine. I have a 2d circle body object that has a matching fixture (I used the CreatCircle method. I did not ...
0
votes
3answers
5k views

2D games on Unity and collision detection performance

I'm developing a 2D game for the iOS platform. I have seen a lot of packages on asset store that makes 2D asset creation for unity easier. I have narrowed my selection to just 2, 2d toolkit and ex2d. ...
2
votes
2answers
895 views

Canvas Rotation collision detection on a sprite

I am using this code to detect collisions between two rectangular sprites. intersect: function(other) { return this.x < other.x + other.width && other.x < this.x + this.width ...
4
votes
1answer
652 views

Implementing jumping and heightmaps in 2D RPG/Adventure style games?

I've been putting together, albeit slowly, a traditional style game engine in flash/AS3 along the lines of Alundra/Final Fantasy 3/etc etc.. Everything so far is working smoothly (maps from XML data, ...
0
votes
2answers
532 views

Ways to define a curve

I'm trying to give shapes in my physics engine roundness/ curvature. I am aware of various methods for mathematically defining curves; such as bezier-cruves, ellipses, etc. However I am not sure ...
3
votes
3answers
368 views

Collision filtering techniques

I was wondering what efficient techniques are out there for mapping collision filtering between various bodies, sub-bodies, and so forth. I'm working on a physics engine and I need ways for a user to ...
1
vote
2answers
581 views

Axis-Aligned Bounding Boxes vs Bounding Ellipse

Why is it that most, if not all collision detection algorithms today require each body to have an AABB for the use in the broad phase only? It seems to me like simply placing a circle at the body's ...
10
votes
2answers
1k views

Continuous Physics Engine's Collision Detection Techniques

I'm working on a purely continuous physics engine, and I need to choose algorithms for broad and narrow phase collision detection. "Purely continuous" means I never do intersection tests, but instead ...
2
votes
1answer
1k views

How to resolve concurrent ramp collisions in 2d platformer?

A bit about the physics engine: Bodies are all rectangles. Bodies are sorted at the beginning of every update loop based on the body-in-motion's horizontal and vertical velocity (to avoid sticky ...
2
votes
5answers
923 views

How do I set up moving platforms in a 2D side scroller to interact with the player properly?

Edit: I changed the way that gravity was applied so that it is applied even when a player is standing on a block, so instead of the game outputting that you are stepping on a tile as true and false ...
12
votes
3answers
3k views

2D game collision response: SAT & minimum displacement along a given axis?

I'm trying to implement a collision system in a 2D game I'm making. The separating axis theorem (as described by metanet's collision tutorial) seems like an efficient and robust way of handling ...
1
vote
1answer
2k views

How can I cancel a contact in a b2ContactListener?

To know when contacts happen we can derive from b2ContactListener and implement our own solution which is great. I'm wondering is there anyway we can cancel a contact, that is to say when we hit begin ...
2
votes
1answer
569 views

Need help with collision detection/resolution in a 2D simulation of 'worm-like' creatures

(originally posted this on regular stack overflow, somebody pointed this forum out :-) ) Hi there, I'm implementing a physics engine for the simulation of worm-like creatures. Problem is, is that ...