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
2k views

Jumping with Mecanim synchronization

I am using Unity3D 4.1 for one of my projects. I have a robot character which is always running. I am using mecanim animation system. What I really want:When I press Space bar, the character should ...
1
vote
1answer
106 views

Adding Leniency to Jumping Mechanic

I have written some jumping code for my player in a platformer game. At the moment it has some basic logic which says that the player can jump if he is on the ground. The pseudocode looks something ...
4
votes
4answers
514 views

The physics equation for a perpetual seesaw

I am trying to create a game that involves two or more people jumping on a seesaw and propelling each other in the air. I need help with the physics equations Assume no friction and no air ...
0
votes
2answers
112 views

How can I simulate a rigid body bounced from a wall in 3D world?

How can I simulate a rigid sword bounced from a wall and hit the ground (like in physical world)? I want to use this for a simple animation. I can detect the figure and the size of the sword (maybe ...
0
votes
1answer
240 views

Performing intersection testing in world's or object's space?

Am adding basic ray casting and collision detection for my game, also adding bounding volumes/collision mesh. Given that the ray is cast in world space and each mesh's node can track world ...
0
votes
1answer
512 views

Box2d making a body follow the mouse accurately

I am trying to make a box2d b2Body follow my mouse position. This is the code I am using at the moment but it is not performing very well: deltaPos = mousePos - body->GetPosition(); deltaPos *= k; ...
6
votes
1answer
319 views

2D Polygon Triangulation

I am creating a game engine using the JBox2D physics engine. It only allows you to create polygon fixtures up to 8 vertices, To create a body with more than 8 vertices, you need to create multiple ...
3
votes
1answer
117 views

What is a collision shape?

I am a business developer who is new to game programming. In learning Stencyl, I see that there are things called collision shapes associated with tiles. This seems to be a standard term in game ...
0
votes
1answer
314 views

Trouble with a modified parallax scrolling concept

I have a set of layers (each of them being a list of items) moving with different speeds as I mentioned here: http://stackoverflow.com/a/18962019/270197. Layers back in the scene move with slower ...
1
vote
1answer
100 views

How to reduce the time it takes to speed up an object?

I have a body that I am applying a force to every step. However, I it takes a significant amount of time for it to speed up, which I do not want. Is there some value I can adjust to help with this?
-1
votes
1answer
346 views

Air Resistance of a Falling Object

I am applying air resistance to a falling sphere using the Euler method. If someone could have a look and tell me if my implementation is correct or offer any tips, it would be highly appreciated. ...
4
votes
1answer
948 views

GGX specular BRDF is way over 1!

Now, the classic Torrance derivation for roughened surfaces which Cook took into vectorized form yields the familiar parametrization of a specular BRDF where we have the NDF which decides how much ...
1
vote
1answer
750 views

Need to translate a Rotation Matrix to Rotation y, x, z OpenGL & Jitter for 3D Game

I am using the Jitter Physics engine which gives a rotation matrix: M11 M12 M13 M21 M22 M23 M21 M32 M33 And I need it so OpenGL can use it for rotation GL.Rotate(xr, 1, 0, 0) GL.Rotate(yr, 0, 1, ...
0
votes
0answers
1k views

Platform game: applying gravity and jumping [duplicate]

I am making a 2D platform game in Java but I don't know how to apply gravity and jumping on my player and other living creatures in game that it looks natural and that it is physical correct. I have ...
2
votes
2answers
374 views

Canting of track in a racing game

I am trying to create a small racing game in which the track would be modeled using a BSpline curve for the path's center line and directional vectors to define the canting of the track at each point. ...
0
votes
1answer
331 views

Showing trajectory indicator

From the image you can see that the ball fired on the left that fire behind it, does not match the calculated trajectory. Im drawing the ball trajectory using an equation from a SO question, this is ...
7
votes
2answers
346 views

How to implement a tractor beam?

I'm working on a game where the player can pick up objects using something like a tractor beam, and carry them around. Attracting the object towards the center of the beam is not difficult. But once ...
2
votes
0answers
176 views

Collision detection with an irregular curve

I'm building a custom physics engine to accompany a level-editor. This image shows how the level-editor outputs levels: Now, some explanation is in order. The curve is defined by the red points. ...
0
votes
1answer
194 views

Issues calculating frame independent movement

I'm developing a Breakout style game in C++ using SDL. The problem so far is that the ball slows down and speeds up for no particular reason. The slowdowns usually last a few seconds. EDIT : When ...
1
vote
1answer
469 views

How can I implement a simple “jump” action with three.js and/or Physijs?

Assume I have a simple Physijs object like this car. How can I adapt something like this to "jump" (hydraulics ftw!) when pressing spacebar for instance? I'm currently thinking applyCentralImpulse ...
-1
votes
2answers
415 views

Move a player in the opposite direction they are looking

I'm looking to move the player in the opposite direction they are facing with a specified force. Rather than try to explain that better I created an image showing what I mean, I've tried reversing ...
9
votes
1answer
359 views

Multiplayer platformer - Are server corrections normally required with a single client on the server?

I am currently working on a rather simple multiplayer platformer. I read quite a bit of articles on the techniques used to hide latency, but I still fail to get my head around certain of the concepts. ...
3
votes
1answer
304 views

Simple 3D collision detection for general polyhedra

I have correctly set up a SAT system. I now need to determine a simple, fast, and general purpose collision detection mechanism to identify the collision points. These points will then be used to ...
3
votes
2answers
823 views

Unity 4 - Some Rigidbodies Won't Fall Asleep

I'm having this problem in the free edition of Unity 4.1 where rigidbodies aren't falling asleep (and yes, I've tried playing with the sleepVelocity and sleepAngularVelocity values!). I've read the ...
7
votes
1answer
1k views

A simple flight simulator

In a 3D flight simulator with a Crimson Skies level of realism (as in, arcade level rather than realistic), how do you determine the movement of an aircraft each game clock tick? (Crimson Skies is an ...
3
votes
1answer
266 views

GPGPU physics & game logic

I'm wondering about gpu accelarated physics after reading about Erwin Coumans presentation on GPU accelerated physics: http://www.gdcvault.com/play/1018185/GPU-Rigid-Body-Rigid-Body (demo video here: ...
1
vote
3answers
559 views

How to move around a player in a curved tunnel?

In a scenario where the player moves freely along the walls of a tunnel (like this), what is the best way to move the player along the walls of the tunnel? I'm using Unity3d game engine. I've tried ...
4
votes
3answers
158 views

Particle dynamics simulation and conservation of energy

Suppose you want to simulate the dynamics of a particle subject to Newton's laws of motion. We could just fix a discretization of the time dt and solve approximate differential equations like ...
0
votes
1answer
190 views

Resolving a collision between point and moving line

I am designing a 2d physics engine that uses Verlet integration for moving points (velocities mentioned below can be derived), constraints to represent moving line segments, and continuous collision ...
0
votes
1answer
834 views

gamemaker getting a ball to bounce 90 degrees off of a 45 angle

I am trying to get a circle to bounce off a 45 degree diamond shap using Gamemaker Studio. I would like the ball to bounce in straight lines so my directions would be 0, 90, 180, or 270 degrees, ...
0
votes
1answer
289 views

How to simulate the movement of a ball in 2D due to force, gravity, and friction with surface?

I have a ball which I kick with some force. It has a starting x,y position, sat (2,3) and an intended target x,y say (7,8) position. That means I have to translate by (7-2, 8-3) i.e. 5 x units and ...
2
votes
1answer
206 views

Implementing a time scale in game with fixed physics update

I'm currently putting together my game loop based on the "Fix Your Timestep" article at gafferongames.com. This is going fine, but I'm also trying to implement a 'time scale', i.e. a way to control ...
1
vote
1answer
260 views

Calculating distance by force

I am trying to predict a ball(sphere) movement. The formula of force which I know is Force=Mass*Accelaration What I want is how can I get distance or displacement by giving particular force? I want ...
4
votes
3answers
258 views

Programming atmosphere for game

I've recently started making game and I want to implement there an atmosphere. My plan is to include in game many compartment, tubes and ventilations. For example if I open and airlock from room with ...
2
votes
1answer
282 views

How do I make my camera follow a Box2D object?

I'm implementing a camera in my game. It worked for regular objects, but I began using Box2D and obviously things changed a bit. I have a Body object that I want to draw at the center of the screen. ...
11
votes
0answers
2k views

Creating Rope Physics for Unity [closed]

I want to create a bungee jumping-like game in Unity and therefore I need a rope physics. I especially need elastic ropes with capability to pull objects with velocity after a little extension. Do you ...
2
votes
1answer
368 views

Box2D: Asteroids-Like Spaceship Physics

I'm new to Box2D (JavaScript) (and the world of physics/mathematics) so I'm having a hard time working out the methods I need to use to make a spaceship act like it does in the classic arcade game ...
1
vote
1answer
271 views

How should I invoke a physics engine?

I'm new to writing games. I'm planning to write a 2D battle game which may require an physics engine. Suppose I've written one, but how can I combine it with the main routine of my game? Should I ...
1
vote
1answer
603 views

Box2d contant speed before and after collision

I want to make my body fly at constant speed, how to make it fly at constant speed before and after collision? I set restitution of my body to 1.0 but after some direct and powerful collisions my ...
0
votes
0answers
90 views

Game physics movement

I am trying to write some code in Pygame that will achieve smooth movement from place to another. I've been able to do some nice physics for jumping but when I need to move horizontally I am not sure ...
4
votes
2answers
415 views

Modular spaceship control

I am developing a physics based game with spaceships. A spaceship is constructed from circles connected by joints. Some of the circles have engines attached. Engines can rotate around the center ...
4
votes
2answers
271 views

Game physics presentation by Richard Lord, some questions

I been implementing (in XNA) the examples in this physics presentation by Richard Lord where he discusses various integration techniques. Bearing in mind that I am a newcomer to game physics (and ...
0
votes
1answer
515 views

Detect when a bullet rigidbody is on ground

I have a rigidbody that is on top of a plane or another rigidbody. How do I check if said rigidbody is on top of it? I tried to check the Y-part of the velocity but it is never 0, it is always a ...
3
votes
0answers
133 views

How to make the Angry Birds “shot arch” dotted line? [duplicate]

I am making a game that includes 2D projectile flight paths like that of Angry Birds. Angry Birds employs the notion that a previous shot is shown with a dotted line "arch" showing the player where ...
2
votes
1answer
199 views

Using Box2D for range detection?

I have two entities. One has a sword, one has a bow and arrow. When the bow entity is 100 units away, he needs to begin attacking. Likewise, when the sword entity is 10 units away, he needs to begin ...
0
votes
0answers
93 views

Tension Force is zero

And it's not supposed to be. I've been pulling my hair out for a while trying to figure out why... The values used in T = F - ma are below: mass of first body: 1 kg acceleration: [0, 9.80665] (as a ...
8
votes
3answers
973 views

Are collision detection always O(n^2)?

Are physics engine able to decrease that complexity, for example by grouping objects who are near each other and check for collisions inside this group instead of against all objects ? (for example, ...
1
vote
2answers
339 views

Jump without bouncing in physics engine

I am using Ogre3D as my rendering API, and OgreBullet as my physics engine. I have an test entity that when the y part of the velocity is 0 and spacebar is pressed, the velocity changes to, lets say: ...
0
votes
2answers
173 views

Physics for space game [duplicate]

I am making a space game where you fly a ship. I am trying to work out the physics for such a game and so far came up with: var thrust; //between 1 & 100 how much the engines are pushing var ...
2
votes
1answer
143 views

Farseer: Shooting a ball in a certain angle?

How can I shoot a ball in a certain angle? When I press the Space key, the ball should be shot in a 45 degree angle. How can I do that?