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

0
votes
1answer
44 views

Moving one object from one point to another with acceleration

How would someone implement moving an object from one point in 2D space to another using these formulae to update objects: m_position.setX/Y( m_position.X/Y() + m_velocity.X/Y() * dt + 0.5 * m_acc * ...
2
votes
2answers
75 views

Why doesn't this 2d physics calculation yield the desired jump height?

I found a formula for gravity and jumping in this article: http://error454.com/2013/10/23/platformer-physics-101-and-the-3-fundamental-equations-of-platformers/ I implemented this formula and ...
0
votes
2answers
33 views

unity2D Top-Dow Mobile rigibody2D

im using this code for my 2D TopDown mobile player movement.but when i move player With UI Image buttons player keep moving.it didnt stop.and also player starting of move he is very slow. the he ...
0
votes
0answers
48 views

Rain World : How to have intelligent movement / animation?

In the project RainWorld the characters seem to move "intelligently" as they move "unrestricted". They seem to know "how" to move their limbs and "what" needs to be done. Here for an example the ...
0
votes
1answer
58 views

Spherical Collision

I have a made spherical collision system which creates a major problem, the balls gets stuck to each other on high speed and sometime with low speed collisions. I researched a lot but I couldn't found ...
0
votes
0answers
12 views

How can I track a leader vehicle at a specific angle and distance?

I am using Matlab and have code which allows a vehicle to find its way to certain coordinates chosen by the user. I now want to add a second vehicle which stays fixed at a specific distance and angle ...
0
votes
0answers
68 views

Physics2D.OverlapCircleAll seems to be bigger than my radius

Im trying to make a "Scorched earth"-like game using unity. I managed to fire my bullet and make it explode on contact. What I am trying to do is do some damage to the tanks even if the bullet didn't ...
0
votes
1answer
58 views

How do I make a time lapse in my code so it updates slower?

I have made some collision if statements, but they didn't work. birdbox3.X += 5; birdbox3.Y -= 5; if (birdbox3.Intersects(Banner1)) { birdbox3.Y ...
0
votes
0answers
31 views

Does unused 2D colliders in Unity affects performance? Is an Edge Collider more performance friendly than BoxCollider2D?

I am using a lot of gameobjects for my platformer that uses BoxCollider2D component to make the scene floor. But only an a selected set of gameobjects actually have some interaction with the player, ...
0
votes
0answers
20 views

Launching projectile from a “canon” [duplicate]

I'm working on "Scorched earth"-like game just for learning purpose. I can't figure out how to launch the projectile from my tank's position, with a power of X ([0,100]),at an angle of Y ([-180,180]). ...
0
votes
1answer
34 views

Using Box2D for soccer physics

I've learned quite a bit of Box2D and I've succeeded basic stuff concluding ball physics. I want to implement 'opposing forces', as the character kicks the ball with a certain strength, with the leg ...
1
vote
0answers
62 views

Cocos2dx+Chipmunk: Fully elastic collision between moving bodies

I'm using Cocos2dx and the built in Chipmunk physics engine, and currently I've got my PhysicsBodys' materials set up with: Density=0 Restitution=1 Friction=0 in order to get fully elastic ...
1
vote
1answer
50 views

Dynamic body in Box2D with fixed position

I need to fix the dynamic body position so that it would not rotate and would not move even if there are other forces, collisions and so on. Let me first explain why I need this. I have a dynamic ...
0
votes
1answer
49 views

Physics-based rotation with an array of pixels

Say I have a simple system, that has a large array of pixels with their own weight, velocity, coordinates etc. (by using classes) if each of those pixels can be connected to 4 other pixels (top, ...
0
votes
0answers
30 views

PhysicsJS object falls through the world

I have a problem while using PhysicsJS when it comes to collisions. I created a physics world, an object and applied gravity. I put the object at a certain position, it falls down because of the ...
-1
votes
1answer
47 views

Relative movement in Box2D (keep object from falling off planet)

I'm creating a game with planets orbiting around a sun, like this: The brown square is the earth, rotating around its center and around the sun. The yellow square is the sun, which doesn't move. Now ...
0
votes
0answers
13 views

How to experiment for the value of gravity in Libgdx? [duplicate]

I am following a guide on how to play a flappy bird clone in the LibGdx framework. -http://www.kilobolt.com/day-5-the-flight-of-the-dead---adding-the-bird.html I am currently on the part where the ...
0
votes
2answers
79 views

How do I derive an appropriate acceleration value for my game?

I am creating a Flappy Bird clone from this tutorial. I have a question about acceleration in libgdx. The author assigned the bird a constant acceleration vector in the constructor of the bird ...
1
vote
0answers
49 views

Farseer: Friend/Foe Collision - cannot push foes but friends

we are using Farseer in our project and I try to find a setup to achieve the following quite complicated collision behavior: Friendly Units can push each other aside. However, the push should be a ...
2
votes
2answers
185 views

2D Boat controlling physics

I'm working on a top-down 2D boat game with Unity3D. I couldn't able to understand how to implement physics of rudder controlling. My physics knowledge is not enough to think how rudder dynamics work. ...
1
vote
1answer
71 views

Lots of bouncing balls sink into each other [closed]

I'm trying to model a system that simulates an arbitrary number of bouncing balls with some gravity. So far I've come up with a solution that can be seen here: ...
0
votes
2answers
105 views

Unity2D Collision Issue

I have a crate setup (in pic below) with a rigid body component, box collider and 3 circle colliders(they allow me to push the crate most of the time without getting stuck on the floor textures which ...
-1
votes
1answer
74 views

2D bouncing formula doesn't work properly

am new to unity, and i am trying to create a bouncing ball, so i've did many researches about bouncing realted physics and i found a formula : Formula: -2*(V dot N)*N + V Where V is the velocity ...
0
votes
1answer
47 views

How to reposition a bouncing ball after it has passed through a surface

I have a bouncing ball which can collide with lines of a random slope. The ball passes through the lines a bit and I need to set the ball back some distance from the line. The ball (defined by ...
1
vote
3answers
80 views

Unity2D: Apply gravity to some items, when everything else is gravity-free?

Sorry for the incredibly vague title: Let's say you have an NPC, and when he dies he'll spawn items, coins for example. Instead of just pushing the coins in random directions it would look a lot ...
2
votes
1answer
191 views

How can I manage the deceleration of units so that they arrive on-target?

When I first started trying to set up my air units' movement in my RTS game, I thought it was going to be easy with simple Euler method linear acceleration. This was far from the case as the ship ...
1
vote
3answers
350 views

Unity rigidbody2d.velocity jumping causes weird bouncing

Im working on a game 2d game that has some platforming. I followed this video as guidance and produced the following code: public class PlayerControler : MonoBehaviour public float ...
0
votes
0answers
72 views

SpriteKit: Is applyImpulse not working correctly?

I am writing a free throwing system and because of this, I created a ball using following code. self.ball.position = CGPointMake(posX, posY) self.ball.fillColor = SKColor.blueColor() ...
1
vote
1answer
126 views

Anchoring HingeJoint2D to clicked upon spot

I'm creating a 2D game where the user can click and drag objects around. This is done by connecting a 'Hand' object to the object the user is current clicking on with a HingeJoint2D. Right now it ...
0
votes
0answers
21 views

How to tell if the ball is on the floor (in nape)?

What I wish to do in pseudo code: points = Get the set of all points (x, y) where the ball is touching other surfaces. point = Get the point out of that set with the minimal (y) value. Check if that ...
1
vote
1answer
38 views

Reduce bounciness of dynamic bodies in Box2D

In my 2D platformer game my player character is modeled using a Box2D dynamic body. One thing I thought feels off though is that even though the restitution of the fixture applied is zero, the player ...
2
votes
1answer
94 views

Implementing character movement using real physics

This is the first time I'm seriously developing a game so apologies if I'm missing the obvious. In my 2D platformer I adopted Box2D since it seemed like a natural solution to model gravitational ...
1
vote
0answers
102 views

How to render multiple objects as a single object for fluid simulation?

I'm trying to do fluid simulation using particles in 2d game. I have larger particles, which interactive each other physically, those particles collide with environment (e.g wall,obstacles) to ...
0
votes
2answers
55 views

Irregular gravity bouncing

I am working in a simple bouncing ball game. The ball moves right to left at a constant speed and back when it collides with the border of the display. But it jumps every time the the user clicks and ...
0
votes
0answers
17 views

Box2d - body size or spatial distribution matters for better simulation?

Box2D better works for limited sizes: Box2D works with floating point numbers and tolerances have to be used to make Box2D perform well. These tolerances have been tuned to work well with ...
0
votes
1answer
161 views

Explain the difference between extrapolation and interpolation

http://www.unagames.com/blog/daniele/2010/06/fixed-time-step-implementation-box2d here there are two algorithms of smoothing in case of fixed time step physics simulation. I don't understand the ...
0
votes
0answers
48 views

Calculation technique for 2D inertia tensors?

Just wondering what the techniques are out there. It's only 2D so I figured there'd be a good chance for there to be a "one size fits all" solution out there that's essentially an analytical solution. ...
1
vote
0answers
110 views

Should I use Box2D for collision-detection only (not simulating physics)? [closed]

I'm using Box2D only to check collisions and for no physical simulation. I create bodies (and shapes for them) and use my own code to move them, by setting their velocities and positions every frame. ...
0
votes
1answer
194 views

LibGDX Bounding Rectangles

I'm creating some rectangles surrounding my sprites for my player and bullet class to detect collisions with the overlaps method in Intersector class of LibGDX. I have a question: When I instantiate ...
0
votes
1answer
201 views

Cocos2dx - Physics - Abort() When Changing Dynamic PhysicBody to Static?

I just learned cocos2dx v3.3 integrated chipmunk physics engine. Here ,as you see, I create a simple circle with physic as: auto sprite = Sprite::create("circle.png"); auto body = ...
0
votes
0answers
94 views

2D Distance Field as collision handler method

Pixeljunk Shooter has really cool fluid simulation. I found the dev's video explaining what they did. Here I understand that it is particle based simulation Smoothed Particle Hydrodynamic I can ...
-2
votes
1answer
79 views

Throwing a bomb LibGDX Box2D [closed]

I am trying to create game where somenone throw a bomb. I am wondering how I can have an bomb react in a way that is represented by the following picture : Is there are any tools in Box2D that can ...
0
votes
0answers
81 views

Breakout Clone: Ball isn't bouncing as expected

So I'm working on a Breakout Clone using Unity 2D Physics only, and I'm having some trouble with the bouncing effect. Every object in my Scene has a Bounciness of 1. First, this is the code of my ...
2
votes
3answers
150 views

Formula for Planetary Alignment

I am attempting to create a game where there is a universe of two 16-bit addresses ranging from -32768, -32768 to 32767,32767, or in hexadecimal, each value can run from $8000 to $FFFF then 0 to ...
3
votes
2answers
221 views

Why is Euler integration sometimes preferred over RK4 even if RK4 is more accurate? [closed]

Some high quality engines such as Box2d uses the Simplistic Euler integrator instead for RK4 when Eumplectic Euler commits a global error of the order of Δt whereas, RK4 has Δtˆ4 error? RK4 is not ...
0
votes
1answer
388 views

Box2D recommended step, velocity and position iterations

Here in this article there is a nice explanation that velocity iterations and position iterations settings affect the way bodies will react when they collide, and step affects on speed and how gravity ...
0
votes
1answer
172 views

How to make an object that has no rigidbody2d component smoothly fall on the ground in Unty2d?

I have two character in my game: enemy and main character. Enemy can throw different objects into the main character. For this moment i am doing this action in such way: void FixedUpdate(){ if ...
2
votes
1answer
101 views

My pool balls often jump around when there are two or more balls colliding/touching

I'm working through the book 'Introduction to Game Physics with Box2D' and I've created a little pool game with the example code. Despite the name, there is NO box 2D used in this particular exercise. ...
0
votes
1answer
115 views

Creating a Player object in a physics engine [duplicate]

I have a working physics environment using Farseer - but how do I create a player object that can walk around? My current attempt involves applying forces to a rectangular body whenever keys are ...
0
votes
1answer
25 views

Should device tilt give my object a starting speed or acceleration?

I'm developing a game for iPhones, which have a body placed in the bottom center of the sreen, and I want to move that body in horizontal axis by player tilting his device in y axis. Everything ...