Tagged Questions

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

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
542 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 ...
16
votes
2answers
4k 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 ...
7
votes
4answers
1k 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
3answers
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
679 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
666 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
744 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
457 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
588 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
124 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
5k 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
602 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 ...
4
votes
4answers
2k 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
730 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
1k 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
4k 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
537 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
2k 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
321 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
4k 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
472 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
663 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
298 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
766 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
4k 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
303 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 ...
3
votes
1answer
213 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
835 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
15k 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
2k 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
358 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 ...
4
votes
1answer
1k 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
324 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
330 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 ...
3
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
437 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
217 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
6k 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 ...
9
votes
3answers
3k views

How do you do AI path following within a 2d physics engine like farseer/box2d?

I'm in the process of moving a 2d top down game I've been working on into a proper rigid body physics engine like Farseer. Up until now, I had just hacked together my own physics code where needed. ...
4
votes
1answer
2k views

Non axis aligned bounding box collision and physics

Exactly how much more expensive, and while we're at it, difficult, is it to have non-axis aligned bounding boxes in your framework? I realise that it very much depends on what you're trying to do, so ...
5
votes
1answer
1k views

How do engines like Unreal relate to OpenGL or D3D?

Well I'm completely completely new to computer graphics and even more to game development. I am searching info and all that stuff to have the basics quickly. But there's a big question mark in my ...
4
votes
1answer
718 views

Heightmap Physics Optimization/Improvement

I'm working on implementing the physics surrounding a player walking on a heightmap. A heightmap is a grid of points which are evenly spaced on the x and z axes, with varying heights. The physical ...
0
votes
2answers
536 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
2answers
1k views

Jumping Vs. Gravity

Hi i'm working on my first XNA 2D game and I have a little problem. If I jump, my sprite jumps but does not fall down. And I also have another problem, the user can hold spacebar to jump as high as he ...
7
votes
2answers
1k views

How can I factor momentum into my space sim?

I am trying my hand at creating a simple 2d physics engine right now, and I'm running into some problems figuring out how to incorporate momentum into movement of a spaceship. If I am moving in a ...