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

9
votes
1answer
164 views

What would be a good filter to create 'magnetic deformers' from a depth map?

In my project, I am creating a system for deforming a highly detailed mesh (clothing) so that it 'fits' a convex mesh. To do this I use depth maps of the item and the 'hull' to determine at what point ...
4
votes
5answers
1k views

Is knowing physics necessary for game development?

Is knowledge of physics necessary to design quality games? How important is it? Be realistic and explain a few novice examples of how's mandatory. What kind of physics is necessary, ...
4
votes
1answer
345 views

BEPUphysics collision with generated terrain?

I've got randomly generated terrain which is stored in a indices and vertex buffer. How do I go about using this for collision in BEPU? It seems I can do it with a Mesh but it would be a waste to ...
2
votes
1answer
263 views

Free physics library?

What are some good recommendations? I have a vertex buffer and indices and I want to be able to detect collision between it and a bounding box or another object.
3
votes
1answer
292 views

Architecture of an action multiplayer game from scratch

Not sure whether it's a good place to ask (do point me to a better one if it's not), but since what we're developing is a game - here it goes. So this is a "real-time" action multiplayer game. I have ...
1
vote
0answers
374 views

How do I properly use multithreading with Nvidia PhysX?

I'm having a multithreading problem with Nvidia PhysX. the SDK requires that you call Simulate() (starts computing new physics positions within a new thread) and FetchResults() (waits 'till the ...
1
vote
1answer
1k views

JBox2D applyLinearImpulse doesn't work

So i have this line of code: if(input.isKeyDown(Input.KEY_W)&&canJump()) { body.applyLinearImpulse(new Vec2(0, 30), cam.screenToWorld(body.getPosition())); ...
7
votes
3answers
3k views

Finding the contact point with SAT

The Separating Axis Theorem (SAT) makes it simple to determine the Minimum Translation Vector, i.e., the shortest vector that can separate two colliding objects. However, what I need is the vector ...
2
votes
1answer
161 views

Newton Game Dynamics: Making an object not affect another object

I'm going to be using Newton in my networked action game with Mogre. There will be two "types" of physics object: global and local. Global objects will be kept in sync for everybody; these include ...
0
votes
1answer
231 views

I am looking to make a spaceship tilt as it corners but I cant get it to return

I am using the TL game engine I am not allowed to use a physics engine but I need to make the spaceship lean as it corners, I can make it lean but cannot make it return to its starting position. I ...
0
votes
1answer
247 views

Calculating an orbit and approach velocties

I have drones in my game that need to approach and orbit a node and shoot at it. Problem is I want to stay away from a real physics simulation, meaning I don't want to give the node and drone a mass ...
2
votes
3answers
1k views

How to make a ball fall faster on a ramp?

So, I'm making a ball game. Where you pick up the ball, drop it on a ramp, and it flies off in to blocks. The only problem right now is it falls at a normal speed, then lightly falls off, not nearly ...
2
votes
0answers
256 views

Independent HTML5 Physics Game: Any Feedback? [closed]

I've been independently developing a physics-based HTML5 game. I haven't used any libraries or engines; all the code, including the physics, is my own. It is free for a while on the Chrome Web Store ...
2
votes
2answers
2k views

How do I convert matrices intended for OpenGL to be compatible for DirectX?

I have finished working through the book "Game Physics Engine Development 2nd Ed" by Millington, and have got it working, but I want to adapt it to work with DirectX. I understand that D3D9+ has the ...
2
votes
1answer
580 views

Getting a sphere to roll down a .FBX object Unity3D/C#

I'm working on a little ramp and ball game in Unity, I modeled the ramp outside Unity and exported it to a .FBX file, then I imported the ramp in to Unity. I set up the ball and ramp, both have ...
1
vote
1answer
5k views

LibGDX Box2D Body and Sprite AND DebugRenderer out of sync

I am having a couple issues with Box2D bodies. I have a GameObject holding a Sprite and Body. I use a ShapeRenderer to draw an outline of the Body's and Sprite's bounding boxes. I also added a ...
13
votes
2answers
3k views

In a 2D platform game, how to ensure the player moves smoothly over sloping ground?

I'm developing a physics engine for a 2D platform game. I'm using the separating axis theorem for collision detection. The ground surface is constructed from oriented bounding boxes, with the player ...
2
votes
2answers
606 views

Is there a standard way to store 3D meshes to easily communicate between libraries?

In a 3D game lots of different systems need to know about geometry data, however the only way they seem to be able to agree to on in representing it by an array of triangles. Can anyone recommend a ...
6
votes
1answer
4k views

Box2D Difference Between WorldCenter and Position

So this problem has been brothering for a couple of days now. First off, what is the difference between say Body.getWorldCenter() and Body.getPosition(). I heard that WorldCenter might have to do ...
3
votes
1answer
1k 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
334 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
740 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
2k 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
373 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
153 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
560 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
5k 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
711 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
678 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
768 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
469 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
598 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
626 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
815 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 ...
6
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
2k 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
552 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
323 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
5k 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
477 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
669 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 ...