Relating to the motion of objects through space and time. Including concepts such as acceleration (thrust and gravity), mass, collision response, friction and more.

learn more… | top users | synonyms

3
votes
1answer
963 views

Resultant Vector Algorithm for 2D Collisions

I am making a Pong based game where a puck hits a paddle and bounces off. Both the puck and the paddles are Circles. I came up with an algorithm to calculate the resultant vector of the puck once it ...
1
vote
2answers
322 views

Dynamic body implementation

I am writing a 2D game where one of the characters has some very particular requirements. This character is a body with no particular shape (similar to a fluid, but not so much), it has to be able to ...
4
votes
1answer
662 views

How to make an object fly out of a slingshot?

At the moment I'm improvising a slingshot, the user can click and drag the projectile and let go. The force on the object is calculated by getting the distance between the vector of the slingshots two ...
3
votes
2answers
1k views

Easiest Way To Implement “Slow Motion” and variable game speed in XNA?

I have an XNA 4.0 game that I want to be able to switch into slow motion and back again to full speed every now and then. So if you kill an enemy the game switches into slow motion as they explode ...
8
votes
2answers
1k views

Physics engine that can handle multiple attractors?

I'm putting together a game that will be played mostly with three dimensional gravity. By that I mean multiple planets/stars/moons behaving realistically, and path plotting and path prediction in the ...
2
votes
2answers
313 views

Automatic weapon recoil with that “Counter Strike”-feel

How would you do it? I already found this function for an impulse (helped by math.SE). It works for single shots, but not for automatic weapons. Any ideas?
1
vote
1answer
152 views

Anybody remember this webpage? [closed]

I remember visiting a webpage some time ago (1 year ago maybe) It contained many java applets, describing how certain mathematical functions like sin, cos, arcsin, exp would make an object move, with ...
3
votes
1answer
482 views

Making particle bounce off a line with friction

So I'm making a game and I need a particle to bounce off a line. I've got this so far: public static Vector2f Reflect(this Vector2f vec, Vector2f axis) //vec is velocity { Vector2f result ...
14
votes
2answers
3k views

Why is RK4 better than Euler integration?

At the end of these great slides, the author compares all the different integrators presented. One way or another, they all fall short except for Improved Euler Integration and Runge Kutta 4 ...
6
votes
4answers
950 views

Server-side physic simulations with hundreds of players

I’m currently working on a singleplayer physics-orientated game where I would like the physics to be simulated server-side. This because the game will have leadersboards, persistant player ...
3
votes
2answers
4k views

Collision detection in 3D space

I've got to write, what can be summed up as, a compelte 3D game from scratch this semester. Up untill now i have only programmed 2D games in my spare time, the transition doesn't seem tough, the ...
0
votes
2answers
562 views

Calculate impulse need on object to throw i Y meters into the air, with varying mass

Say I have an object that has a variable mass. Now I want to apply a vertical impulse (straight up into the air) onto the object, so it always flies up to the same height. How do I calculate this? So ...
2
votes
2answers
602 views

How do I handle walking up and down bridges at any angle?

I'm currently trying to create a 2D platformer puzzle game like Mario vs. Donkey Kong: Mini-land Mayhem! within Flash. My issues reside in the bridge collision with the walking AI. The game allows ...
2
votes
1answer
651 views

Box2D + Love2D (Lua) - Assertion fail with polygon meshes

When I try to create a triangle collider for my game it sometimes leads to an assertion fail. I use the physics engine that comes with love2d (Box2D). That's the error message that appears when the ...
4
votes
2answers
420 views

What AI technique should I use to control a car in a bumpy environment?

What kind of AI can you recommend controlling a car in a level where there are hills, sharp turns, straight parts, et cetera? There is AI in the game already. It uses points on the road to which the ...
4
votes
1answer
554 views

Multiplayer box2d networking for turn based game

I am currently in the planning stages for a 2D game for mobile devices which I will be making in C++ using cocos2d-x. The game will be turn based and each turn will have a phase in which the physics ...
1
vote
1answer
118 views

NxWheelShape Tilt with Vision(Havok) Engine and PhysX 2.8.x

A vehicle I am working on has front wheels that can tilt(lean) left and right as well as turn left and right. The turning was pretty easy, but there seems to be nothing on how to set a WheelShapes ...
2
votes
4answers
4k views

box2d and constant movement

i'm developing a game with a top down view, the players body is a circle. To move the character you need to tap on the screen and it moves to the spot. To achieve this i'm saving the coordinate of ...
3
votes
1answer
507 views

Calculating torque required to turn an object to a target rotation, depending on timestep

The function below works fine, when the timesteps of the physicsengine are short enough for the function to update often. It determinates when the ship(the object) needs to start decelerating to reach ...
6
votes
1answer
627 views

What are some good methods of implementing RTS-style Box selection?

i'm just scouting around for different methods of implementing a typical rts box selection (not the 2D box on the screen, but what units are selected with the box) when selecting units, and would ...
3
votes
4answers
1k views

Which Side Was Hit?

I am working on an Android game and I have two objects A and B (both rectangles) and when they collide I simply want to know which side of B was hit. I have detected the collision fine, but I am ...
0
votes
1answer
439 views

Sliding down the slope

I've just gotten a triangle collision object in using the Separate Axis Theorem, the triangle has a 45 degree slope and resloves collision detection via the projection method. The actual collision ...
-1
votes
1answer
913 views

Ball Physics for Android Game

I am starting work on a new Android game and I haven't had any experience implementing physics before. I am trying to steer clear of external libraries such as box2d, not just because I think it is ...
5
votes
3answers
2k views

Determine Resulting Angle of Wall Collision

So I have an object moving in a direction towards a fixed horizontal or vertical wall. How do I compute the angle that the object should bounce off at? The object can approach the wall at an arbitrary ...
12
votes
1answer
1k views

How do I simulate a doppler effect in a game?

I am trying to simulate the doppler effect in a game (a car racing game). I am not using a specific sound library that simulate the effect, I only have a callback function where I mix the data. I ...
1
vote
1answer
486 views

what is the absolute simplest way to add physics to a simple 3D game

This physics does not have to be very complex at all. There are a number of rectangles and one ball, all of which have the appropriate bounding volumes constrained to them, it would be great if the ...
2
votes
3answers
1k views

simplest way of making a sphere roll in a realistic way

rather than just moving a sphere across a plane, I want to make it roll like a ball. What is the simplest way of doing this? I assume it will have something to do with the circumference of the ball ...
4
votes
2answers
316 views

Box-box contact information

I have two colliding boxes, How i can calculate contact information like (contact normal, contact point and penetration) . Is there any simple algorithm . Note: i'm using XNA .
3
votes
1answer
3k views

Creating sideways friction in a 2D top down racer

I've been playing around with trying to create some kind of top down racer but I'm having trouble getting the car to turn properly. At the moment this is the code I have to update the position of the ...
2
votes
1answer
2k views

How to control a spaceship near a planet in Unity3D?

Right now I have spaceship orbiting a small planet. I'm trying to make an effective control system for that spaceship, but it always end up spinning out of control. After spinning the ship to change ...
0
votes
2answers
453 views

3D tilt angle for an arrow in archery game

How can I calculate the angle of rotation/tilt of an arrow in 3D? When I say angle I mean the angle the arrow takes when it flies through the projectile path. I am using logic given in the below ...
4
votes
3answers
630 views

IndexOutOfRangeException on World.Step after enabling/disabling a Farseer physics body?

Earlier, I posted a question asking how to swap fixtures on the fly in a 2D side-scroller using Farseer Physics Engine. The ultimate goal being that the player's physical body changes when the player ...
-2
votes
1answer
279 views

How can I create a curved path for a ball?

I am creating a soccer game. Now I want to shoot the ball and create an after-effect resulting in a curved path. I tried several things, but nothing seems to work. I am using a 3D tool, but the ...
2
votes
2answers
687 views

How do I do 3d collisions in isometric game?

I've wondered how to get basic collision detection working in an isometric game. I'm using panda3d which has very comfortable support for bullet, ode and a small builtin physics framework. The problem ...
6
votes
2answers
3k views

how to ignore physics collision of some objects in box2d

I know this sounds silly but I would like some objects to follow physics while others not to collide each other. I tried to achieve them by setting their position exclusively. But then it will ...
3
votes
1answer
279 views

Why does my ball always bounce perpendicular to walls?

I'm using Box2D. I think it's something to do with wall's fixture definition, but when a ball goes toward a wall at a 45 degree angle, I would expect it to bounce off at 135 degrees, but it always ...
2
votes
0answers
187 views

How do I run a callback when all objects have stopped moving?

I'm using Bullet and want to take some action once all objects in a dynamic world have reached 0 velocity (or at least a value that's very close). I was trying to iterate over all of them all the ...
4
votes
2answers
714 views

Simulating the effects of wind

I am developing a mobile game for Android. It is a 3D jumping game (like ski jump) where wind plays a important role so i need to simulate it. How could I achieve this? The game uses libgdx for ...
7
votes
4answers
12k views

2D character controller in unity (trying to get old-school platformers back)

This days I'm trying to create a 2D character controller with unity (using phisics). I'm fairly new to physic engines and it is really hard to get the control feel I'm looking for. I would be really ...
7
votes
2answers
1k views

How to resolve penetration of two colliding bodies

I've implemented simple 3D game physics engine. I already have decent collision detection in place, now I'm trying to figure out the collision response part. I'm using impulse based method to ...
2
votes
2answers
345 views

Understanding Fixed time step

From what I understand about time based Euler Integration is that you will set a number of pixels you want your object to move in the space of second and then the value will be regulated based on the ...
2
votes
1answer
788 views

Effects of collisons: broken glass, damaged cars, how are they created?

My question is related in particular to achieving the effects of collision in game engine, how is this done? I have searched a bit, read from the internet and went through a few tutorials, and saw ...
2
votes
1answer
312 views

How do games using physic engines for 2d games handle platform corners?

I have seen games like latest "2'5D" sonics that handle collision detection at platform corners pretty well. The problem I'm having is that my game uses an ellipsoid as my player's body to let it ...
0
votes
1answer
322 views

Why is my character not moving when applying an acceleration to it?

I'm having issues with my character in terms of gravity and the character bouncing up and down. You can find more information about it in the link below. Character bouncing off ground due to gravity ...
2
votes
2answers
3k views

How to implement “Flick” gesture for throwing an object in the 2D realm

I am trying to implement a FLICK gesture for throwing a ball from point A to point B on the iPhone. This is my current plan.... Using touchesBegan and touchesEnd I can find the direction I need to ...
0
votes
2answers
427 views

iphone 3d library with physics

are there any light 3d iphone libraries that must have: Physics ( ragdoll physics ) 3D scene graph Advanced lighting (lightmapping and stuff) Sound engine Ability to import 3D model from blender, 3d ...
3
votes
2answers
212 views

What is a fair latency, to cut off game connection at?

I'm currently coding a realtime game. I'm doing alot of technical operations with the physics world (resimulations of old world states etc.) to prevent game lag. I save the world state every physics ...
6
votes
1answer
1k views

Character bouncing off ground due to gravity

Implementing gravity in the game, the character keeps bouncing up and down slightly when he hits the ground, upon debugging the character is essentially bouncing on and off the ground. Not quite sure ...
4
votes
5answers
5k views

Box2D physics editor for complex bodies [closed]

Is there any editor out there that would allow me to define complex entities, with joins connecting their multiple bodies, instead of regular single body entities? For example, an editor that would ...
11
votes
1answer
2k views

Should I write my own physics engine, because of networking integration?

I'm currently developing a top down, realtime, zombie shooter. I'm coding this in Java, using JBox2D as my physics engine. I have been coding the networking this week, and am now up to the physics ...