0
votes
1answer
82 views

Bouncing ball slowing down over time

I use the unreal engine 4 to bounce a ball off of walls in a 2D space, but over time the ball gets slower and slower. Movement happens in the tick function of the ball FVector location = ...
-3
votes
1answer
164 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 ...
2
votes
1answer
158 views

Using Box2D / Physics with Tiles?

Here is my issue. I currently have Box2D setup and working. But, it works with my Entity system. So I can create static objects and dynamic moving ones, and they simulate fine. However, my world is ...
2
votes
4answers
262 views

Using forces to reach a specific velocity

In my game, I currently move the player by directly setting its velocity on key press events. This makes the game feel very responsive and allows the user to quickly change direction. However, I ...
2
votes
1answer
125 views

How to calculate new velocities between resting objects (AABB) after accelerations?

lately I have been trying to create a 2D platformer engine in C++ with Direct2D. The problem I am currently having is getting objects that are resting against each other to interact correctly after ...
0
votes
1answer
184 views

Issues calculating frame independent movement

I'm developing a Breakout style game in C++ using SDL. The problem so far is that the ball slows down and speeds up for no particular reason. The slowdowns usually last a few seconds. EDIT : When ...
4
votes
3answers
696 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 ...
1
vote
1answer
315 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 ...
3
votes
1answer
336 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 ...
1
vote
1answer
270 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 ...
8
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?
5
votes
5answers
2k views

How to lead a moving target from a moving shooter

I saw this question: Predicting enemy position in order to have an object lead its target. My situation is a little different though. My target moves, and the shooter moves. Also, the shooter's ...
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 ...
1
vote
1answer
737 views

Game Physics With RK4 Implementation For A 2D Platformer

I been reading about RK4 for physics implementation in a game, so I read in some pages and all people recommend me this page: http://gafferongames.com/game-physics/fix-your-timestep/ This page shows ...
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 ...
4
votes
3answers
566 views

2D physics library that supports curved surfaces and inverse or boolean shapes?

I've been using box2D for a few months, but I now badly need a physics library which can use boolean shapes (ie; cutting a circle out of a square) and/or curved surfaces. Does anyone have any ...
-4
votes
3answers
771 views

Homemaking a 2d soft body physics engine

hey so I've decided to Code my own 2D soft-body physics engine in C++ since apparently none exist and I'm starting only with a general idea/understanding on how physics work and could be simulated: ...
5
votes
2answers
2k views

2D soft-body physics engines?

Hi so i've recently learned the SFML graphics library and would like to use or make a non-rigid body 2D physics system to use with it. I have three questions: The definition of rigid body in Box2d is ...
7
votes
6answers
409 views

Determining player.isFalling() through change of y?

I'm currently using Box2D and my character is a bunch of fixtures in Box2D. I was wondering if, to determine if a player is falling, detecting a change in Y position would be appropriate? Are there ...
14
votes
1answer
7k views

Quad tree vs Grid based collision detection

I'm making a 4 player co-op r-type game, and I'm about to implement the collision detection code. I've read a lot of articles and stuff about how to handle collision detection, but I'm having a hard ...
5
votes
4answers
6k views

2D AABB collision response

I'm making a simple platformer, and I wanted simple collision handling. So I gave all my objects an AABB hitbox and tried to resolve collisions. However, I can't get it to work. My main character has ...
8
votes
1answer
419 views

How can I copy or back-calculate definitions for an entire b2World?

I'm working on a platformer where I'd like to be able to move or copy bodies between multiple Box2D b2Worlds. The desire has cropped up three times now - moving objects between documents in my editor, ...