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

0
votes
1answer
23 views

AddRelativeForce not working correctly

I am stuck on the code for couple of days but couldn't figure it out. Therefore I turned out to look the answer here but couldn't find any that match the requirement Hope some One might help here is ...
0
votes
1answer
31 views

How can I implement a more realistic momentum system in Unity 4.5?

I'm just starting out with Unity and am making a simple environment where there is a sphere and a ramp. When the sphere approaches the ramp everything is fine. As soon as the sphere hits the ramp is ...
1
vote
1answer
28 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 youve ever ...
1
vote
2answers
61 views

How do you properly implement level boundaries in a physics room?

I have an issue with creating a proper boundary in GameMaker Studio when using a physics enabled room. My room has a gravity of 0, as it is in Space. My player object has the default values, but a ...
0
votes
0answers
10 views

Spritekit physics engine inconsistencies [closed]

reading this article I notice that spritekit has inconsistent results in its physics engine due to timestep issues. http://www.element84.com/comparing-sprite-kit-physics-to-direct-box2d.html It ...
1
vote
3answers
39 views

Character animation in physics-simulated environment

What are the standard solutions for animating characters in physics-simulated environments? Let me explain what I mean - in most games characters are pretty much excluded from physics simulation - ...
-1
votes
2answers
36 views

Character bounces/stutters down hills

I'm using Unity3D (not 4) and I'm experiencing a bit of a problem with character movement. I'm using a cylinder as a First Person player with a child Main Camera. In this cylinder is the stock ...
0
votes
1answer
27 views

Moving multiple hingejoints based on joystick input

I'm controlling a 2D side-viewed (facing right) stickman with a joystick. The movements are fairly intuitive: Joystick down -> Stickman crouches down Joystick up -> Stickman stretches out ...
0
votes
0answers
22 views

Friction effects on ball motion direction when crossing surfaces edges

I have a ball rolling from a high friction coefficient surface (snow) to a very low friction coefficient surface (ice). When the ball crosses the boundary at an angle, I believe it should change ...
2
votes
1answer
75 views

Best practice for organizing the physics of objects?

Apologies because this is a long post and I am inexperienced. I would really appreciate the input from some experienced developers. These are my two goals for this project: To learn the best ...
4
votes
3answers
181 views

How do I resolve a sphere-triangle collision in a given direction?

I am trying my hand at game physics. I understand that the basic way to pull back a sphere when it collided is to negate the penetration distance: // If collided... // `distance`: distance form ...
1
vote
0answers
16 views

PhysX - Revolute joint around unit vector

I'm using a right-handed coordinate system with (0,0,-1) = forward, (1,0,0) = right and (0,1,0) = up. PhysX version is 3.3.0. I have a unit vector which represents the axis around which my actor is ...
-1
votes
0answers
14 views

Understanding the use of MTV for an elastic collision response

So, I'm trying to simulate polygon physics, both linear and angular. To calculate the MTV is easy in SAT (Minimum Translation Vector), and to use it to adjust position is also easy: PolygonA.center ...
3
votes
2answers
98 views

Why are my Box2D wheels slipping on ground?

I have a car, set up in Box2D as a rectangle connected with two wheels using WheelJoints: The wheels are defined as follows: FixtureDef wheelFixtureDef = new FixtureDef(); ...
0
votes
0answers
13 views

CCTextField won't appear

I can't seem to add a CCTextField in my physics node, I tried all different methods, but it's still not happening. Here's my code: CCTextField *tf = [[CCTextField alloc] init]; tf.contentSize = ...
0
votes
2answers
121 views

How to add a constant horizontal force just like gravity?

I want to add a constant horizontal force, just like gravity to a projectile or a sphere moving in 3d space, which will make the projectile or ball or sphere or whatever be influenced by this force so ...
3
votes
1answer
99 views

Unity's default integration method

Which method(s) does Unity provide for physical integration? RK4? Verlet? Euler?
0
votes
3answers
105 views

What is the easiest way to make an object follow the edge of a sprite?

I have a rounded rectangle sprite and another sprite that's just a circle. I want the center of the circle to follow the edge of the rounded rectangle. Is there any easy way to accomplish this task? ...
0
votes
0answers
19 views

Box2D collision damage calculation from postSolve or not?

I'm using postSolve to get impulse then calculate damage base on that impulse. But there's some issue: Stability The damage isn't stable. When the same ball is hitting with same speed, the damage ...
6
votes
1answer
113 views

How can I predict player-to-projectile collisions in Box2D?

I'm making a real time shooting game with Box2D as the physics engine. The gameplay is mostly about trajectory, like Angry Birds. I want to make a slow motion effect and move camera to the player when ...
5
votes
1answer
128 views

Self colliding cloth physics

I've previously simulated cloth using Verlet integration but couldn't successfully get the cloth to collide with itself in an efficient way. The reason being is because I used a brute force algorithm ...
2
votes
1answer
43 views

Is there a way to view all colliders in a unity project at runtime (after the game have been deployed)?

I'm have created a small Unity project but physics has weird behavior (bug). Unfortunately it only happens on some specific hardware (after build), not on development machine. I don't know what is ...
0
votes
1answer
61 views

Bullet 3D Physics Objects Not Rotating?

So I've got Bullet 3D controlling the motion of objects rendered with DirectX. In the clipping below I've got 2 identical rectangles & 5 balls. The lowest rectangle has a mass of 0 and doesn't ...
2
votes
2answers
43 views

How can I add an impulse to specific rigid bodies at rest?

Scenario Rocks falling down a rocky slope, with a flat surface at the bottom. When they land on the surface, the rocks move slightly before coming to a rest. GLESDebugDraw shows the bright orange ...
0
votes
1answer
36 views

How to resolve OBB collision penetration?

I would think this is a common issue, but I couldn't find an answer that helped me. Help would be appreciated. In my game I have rectangular objects. They have rotating bounding box, aka not AABB but ...
0
votes
1answer
43 views

How can I avoid type checking in the physics side of collision handling?

I have a class responsible for handling the physics side of collisions. When the collision detector spots a collision, it notifies both entities in the collision to take care of gameplay. It also ...
1
vote
1answer
31 views

Forces on entities: remove all each update step, or remove on demand?

Following the answer to my question here, the way I apply forces on an entity, is each entity has a Map of forces (Vectors) and their IDs. Every update step, the acceleration vector is set to the sum ...
4
votes
2answers
213 views

How can I synchronize ocean waves over the network?

I've been performing a little bit of research in my spare time on ways to increase the interactivity of environments in a networked game or simulation. One of my areas of research is fluid-dynamics ...
2
votes
2answers
110 views

How to correctly implement player acceleration caused by player input

In my game I implement movement in the Player class like so: // called from Player's update() method, which is called from the gameloop. void move(){ velocity.x += acceleration.x; velocity.y ...
1
vote
1answer
68 views

2D how to add graphics for liquid physics?

I was always wondering how to add the graphics to a a blob body for example, regardless of what engine or library you are using, i want to know (theoratically) how to move from this state : ...
0
votes
1answer
34 views

Accelerated Motion

I'm making a menu for my game with SDL, when you click on an option a sub menu slides down and is shown, just sliding down is really boring, so I want it to accelerate(like if gravity was pulling it) ...
1
vote
1answer
96 views

Unity: Rolling a ball around a spherical planet with forces

I'm trying to make a game in Unity where the player character is a ball (a sphere), and the game world is a planet (a very large sphere) that the ball can roll around on. The ball can be rolled in any ...
0
votes
2answers
108 views

Without using a pre-built physics engine, how can I implement 3-D collision detection from scratch? [closed]

I want to tackle some basic 3-D collision detection and was wondering how engines handle this and give you a pretty interface and make it so easy ... I want to do it all myself, however. 2-D ...
5
votes
3answers
1k views

Is it a good plan to use 2D physics for a 3D racing game? [closed]

I am working on a 3D racing game using SDL and OpenGL. I thought it would be easier to use a 2D physics engine, since I really don't need the 3rd dimension. There will be no flying cars or jumps, they ...
0
votes
1answer
92 views

Resolution independent physics

I'm making a game like Doodlejump but don't know how to make the physics scale on multiple resolutions. I also can't find anything related to this on Google. Right now I'm scaling the game using ...
1
vote
1answer
64 views

Reflection velocity

I'm trying to get a moving circular object to bounce (elastically) off of an immovable circular object. Am I doing this right? (The results look right, but I hate to trust that alone, and I can't ...
1
vote
0answers
38 views

Bullet Physics ConvexDecomposition?

I've looked at Bullet Physics ConvexComposition Demo and would like to implement that in my game but the code is so undescriptive and it's hard to understand what is going on. Would any of you people ...
0
votes
1answer
29 views

Inertia in flight simulation using box2d

I'm trying to simulate flight using box2d and libgdx. The main problem I am currently experiencing is with inertia: since there is no air, the plane looks like it were drifting. I wasn't able how to ...
0
votes
1answer
52 views

Load Meshes with Bullet Physics

I just started implementing some physics in my game with Bullet Physics and I was just wondering how would i use bullet physics to load in meshes. For my for DirectX I load in x files into a ...
4
votes
1answer
228 views

Unity falling body pendulum behaviour

I wonder if someone could provide some guidance. Im attempting to create a pendulum like behaviour in 2D space in Unity without using a hinge joint. Essentially I want to affect a falling body to ...
34
votes
3answers
7k views

Why do we use the Pythagorean theorem in game physics?

I've recently learned that we use Pythagorean theorem a lot in our physics calculations and I'm afraid I don't really get the point. Here's an example from a book to make sure an object doesn't ...
4
votes
2answers
1k views

Why isn't this physics code scaling velocities separately?

I'm working my way through this book and I'm trying to work this code out: var squaredVelocity = this.velocity.x*this.velocity.x + this.velocity.z*this.velocity.z; if ...
0
votes
1answer
91 views

Making particles accelerate toward a mouse point

I'm currently working on a particle simulation program that makes pixels move towards a mouse point continually accelerating, but i'm running into some math issues. Currently my particle will ...
1
vote
1answer
134 views

Spaceship acceleration for following waypoints

I'm creating a turn based space ship strategy game with simultaneous turn resolution similar to Steam Birds. After all the orders are given, the ships run through a real time simulation where they ...
0
votes
0answers
76 views

Realistic collisions with a kinematic rigidbody?

I have a car game where player drives a car; this car has a collider and a kinematic rigidbody attached and is completely controller by script (i.e. a script sets its position and rotation). In the ...
21
votes
6answers
2k views

How can I Intercept object with a circular motion

I am creating a 2d space game and need to make the spaceship intercept a planet. I have working code for straight line intercepts but cannot figure out how to calculate the planets location in a ...
1
vote
2answers
92 views

Unity - Across the wall

I have a problem here. I animated my main character and is working. It walks run and jump however it goes across walls and ground. As in every single video I watch in unity tutorials I put a ...
6
votes
1answer
224 views

How do I make a slot car game?

I new to game development with Unity and my first project is a slot car racer. For a realistic slot car-like-driving experience, I first build a track with a channel in the track and a pin on the car. ...
3
votes
3answers
288 views

Throwing a ball and estimating its path using a Physics engine

The problem: A player entity wishes to throw a ball from a known position with a known initial velocity. The surrounding environment contains physical objects that can alter the trajectory of the ...
1
vote
1answer
49 views

How to convert strict limit in position into gradual slow down?

The player moves a spell object, the spell must stay withing a certain range of the player. The spell is moved using a physics system and it has mass and velocity. Currently when the spell goes out ...