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
0answers
10 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
26 views

3d or 2d engine for 2d game with 3 axis physic [on hold]

currently im developing game like this sonic, https://www.youtube.com/watch?v=KzsdBMg8eOA i think this game using 2d engine at first, and after work some time, i have confusion on the physic world, ...
0
votes
0answers
19 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]). ...
1
vote
1answer
518 views

Spritekit - gradually apply force vector in different direction (space ship turning)

I have a space ship that I'm applying a force vector to using a joystick for control. I would like this to smoothly fly around when I'm switching directions.. Exactly like minisquadron if you've ...
0
votes
1answer
16 views

click to move, RigidBody2D error I am suspecting? [on hold]

I have been working a bit on this, and I can't figure out why the velocity of Rigidbody2d is going haywire.Character bumps the air like crazy if isKenimatic is toggled off, elsewise he moves ...
0
votes
1answer
158 views

2D animated sprite jumping and gravity physics

I'm currently writing a Megaman clone for my school project. So far all I did was making the character run and stay put when needed. Know I want to be able to make him jump using the 'X' button. I ...
0
votes
1answer
152 views

Mobile: Physics and movement actions

I've been using spritekit for a while for a few small games. One thing I've noticed is that spritekit is the first game framework I've used that allows me to apply move actions to physics bodies. ...
0
votes
1answer
28 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 ...
0
votes
1answer
133 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
2answers
79 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 ...
0
votes
1answer
1k 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
427 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 ...
2
votes
1answer
183 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 ...
2
votes
2answers
215 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
vote
0answers
32 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 ...
0
votes
2answers
496 views

Use both AddForceAtPoint and change velocity property?

I'm using Rigidbody2D for some game objects. It seems that when I AddForce() or AddForceAtPoint(), the game objects are mostly affected on the Y axis and hardly at all on the x axis. I don't ...
1
vote
1answer
29 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
25 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
vote
3answers
135 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 ...
-1
votes
1answer
43 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 ...
5
votes
2answers
143 views

Determining a sensible gear-like hierarchy for a series of connected objects

I would like a series of objects to behave in similar manner to a series of connected gears. This means that each black object in the diagram below will rotate at a speed based on the ratio of their ...
0
votes
2answers
72 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 ...
2
votes
2answers
147 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. ...
0
votes
1answer
148 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
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 ...
1
vote
0answers
42 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 ...
1
vote
1answer
65 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: ...
65
votes
5answers
28k views

Good 2D Platformer Physics [closed]

I have a basic character controller set up for a 2D platformer with Box2D, and I'm starting to tweak it to try to make it feel good. Physics engines have a lot of knobs to tweak, and it's not clear to ...
-1
votes
1answer
60 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 ...
9
votes
4answers
1k views

How do I implement deceleration?

I say "deceleration" because I'm not using acceleration at the moment; what I mean is moving the velocity back towards zero, eventually stopping. I'm new to vectors and not so great with physics and ...
2
votes
1answer
160 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 ...
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
71 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 ...
1
vote
3answers
205 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
50 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() ...
7
votes
1answer
986 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 ...
1
vote
1answer
95 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
20 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 ...
0
votes
1answer
110 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 ...
-2
votes
1answer
78 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 ...
1
vote
0answers
99 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 ...
2
votes
1answer
83 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
1answer
36 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 ...
0
votes
2answers
54 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
0answers
44 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
100 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
151 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
78 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 ...