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
90 views

How to do an anti sway bar for a car in Unity 5?

I have researched some examples of anti roll bars for Unity but they are all for unity 4 and bellow so they do not work in unity 5. Can someone please assist me in making an anti roll bar script in C# ...
1
vote
1answer
110 views

Collisions being detected before objects are intersecting

I'm making space invaders (in OpenGL/SDL) and I'm currently having issues with getting the collisions (box collisions) between the bullets and the enemies to be properly detected. In my update() ...
0
votes
0answers
41 views

My Movement Function is working good but called only once

I have a function, It's working but not getting called every frame if It's in canMoveDown function but !canMoveDown its not. if (!canMoveDown && UpdateTilePhysics(currentBoardPiece)) like ...
0
votes
0answers
35 views

`setVelocity` allows body to pass through bodies

In my game, I'm using cocos2d-x and I wanted to have an object that changes direction immediately, so I used setVelocity() on the physics body to do that. However, when I do that it can run through ...
1
vote
0answers
43 views

Implementation of a quaternion based hinge constraint

I'm trying to implement a hinge joint between two rigid bodies based on Lagnange multipliers, s.t. constraint functions to be constraints on quaternions, which describe bodies orientation, itself. ...
0
votes
2answers
111 views

How to fix my tile-based game's tile movement code ? (like a CandyCrush Style)

I'm currently creating a tile-based game like a CandyCrush style direction movement (no problem on only down movement) trying to smooth, not laggy tile movement with a board piece, and I'm writing a ...
0
votes
4answers
81 views

Issue translating objects by one unit in the y direction

I'm currently making space invaders (in OpenGL/SDL) and I'm running into an issue with the movement of the aliens. I have a 2-d vector of aliens (5 rows of 11) and I'm translating each in the x ...
2
votes
1answer
48 views

Unity rigidbody exhibits a premature max speed

In effort to build a racing simulator, I have been working on a working model for the pistons in the engine, and have come to a bit of a stand still. I have gone through extensive testing, through ...
0
votes
0answers
15 views

Farseer 3.5 RevoluteJoint Breaking

I think I'm missing something completely and the solution is unbelievably simple, but I'm at a loss at the moment. I'm trying to build a stylized car, with a rectangle as car body with two circles as ...
2
votes
2answers
60 views

Rigidbody2D Circular Orbiting

I am trying to create a basic solar system in 2D. All space objects has CircleCollider2D on them (which are required for raycasting in another script). Currently planets are childs of stars, and ...
4
votes
2answers
163 views

How to resolve push block physics in a 2D side scroller puzzle

I've been working on a 2D tile-based side scroller puzzle game in Unity with obstacles such as doors, keys, fans, portals, etc., but one type of obstacle, push blocks, is giving me some issues. Here ...
0
votes
1answer
67 views

How to calculate/detect the force of a collision? (Game-Maker Studio)

How can I use game-maker to detect the force in a collision between two mobile (not fixed) objects? This is used for damage calculation and possibly compression calculation. My problem is this: ...
1
vote
0answers
34 views

Lateral Slip of car

I have been following this Gaming Institute tutorial and tried to make that car physics system in Blender Game Engine. ...
0
votes
0answers
75 views

HingeJoint shaking, Unity3D 5

I have player with CharacterController and door with HingeJoint, I also have enemies with NavMeshAgent. When someone gets inside this door, it starts shake, jitter, rotating etc. For player I use this ...
0
votes
1answer
60 views

How to calculate acceleration and deceleration

I have a car with speed x, and can accelerate at a rate of 0.5 m/s^2, and can decelerate at a rate of -0.1 m/s^2. Maximum speed is 20 m/s. To accelerate the car speed, at each frame I need to do: ...
0
votes
0answers
49 views

When are Lagrangian Mechanics useful in a game?

I have not used or heavily studied Lagrangian Mechanics before and I have not built a physics engine modeled with constraints yet. I understand that Lagrangian Mechanics are an alternative way to ...
1
vote
1answer
77 views

How to calculate distance of travel needed get achieve speed x?

I have a boat traveling at 20 meters/second approaching destination x. Destination x has a range radius of 10 meters. What I would like to do is make sure by the time the boat arrives within 10 meters ...
0
votes
1answer
54 views

How can I handle multiple force in Unity?

I'm trying to get my character to perform a "dash" where their x velocity increases rapidly and then falls over time. However, I'm also maintaining a constant x velocity so the character appears to be ...
1
vote
2answers
99 views

Keep gravity velocity the same all the time

I have 2D rigidbodies that fall to the ground, however they speed up while falling. Also, when they freeze in the air and then unfreeze, the velocity is set to 0 and they gradually start speeding up ...
1
vote
0answers
53 views

How do I simulate vehicle movement in a non-gravity environment (e.g., space)?

As a series of small experiments, I've began to tinker with game development, specifically using SpriteKit and Swift. I'm looking to simulate a body moving through a non-gravity environment, ...
3
votes
1answer
228 views

Player keeps bumping when walking over to another sprite

So, my problem is that my play when he walks over to another sprite he will stop. I fixed that by adding a physics material with 0 density and 0 friction to the player and adding a circle collider ...
1
vote
1answer
79 views

2D sunrise in Unity

I see a lot of guides on how to create sunrise in 3D space, but I can't find much information on how to do it in 2D. In 3D, you rotate a lightsource around itself, but in 2D, I need to move the object ...
0
votes
1answer
70 views

Issue with detecting collisions in Pong

I've been working on making Pong in OpenGL and SDL and currently have both paddles and the game ball set up properly. I have an Object (or Entity) class which is used to instantiate each of the ...
0
votes
0answers
93 views

UE4 - Physics Body Character Movement

'Ello folks! I'm looking for some advice on how to implement a certain system in UE4 - I've been trying to develop this system for a few weeks but it's been a buggy and largely ineffective attempt. ...
0
votes
1answer
88 views

Libgdx Fine Tune Megaman Movement

With help from my last question, I was able to fix the issue of having a stuttering effect if you keep hitting jump, while jumping. I believe I have managed to match moving on the X axis and the ...
0
votes
0answers
32 views

What Is Vector Math? [duplicate]

Okay so I was wondering, what exactly is "Vector Math"? I was wondering if I needed to know physics for game development, and most people said you just need to understand the basics, but they said ...
0
votes
4answers
154 views

Lunar Lander calculating gravity, acceleration and collision in GameMaker

I've already asked this on the GameMaker forums but had no response so far. I'm making a little Lunar Lander game as my first foray in to GameMaker, I'm wanting to have the ship land and take off ...
0
votes
1answer
82 views

How often should I calculate the position of a bullet?

In game's like Battlefield or Arma, how many times per second is the position of a bullet calculated?
0
votes
1answer
50 views

Should a transform class store a matrix or seperate position/rotation/scale values?

I'm creating a transform class to make storing the transform of individual objects in a scene easier, but I'm unsure on how to do it. I could create one like this: class Transform { public: ...
4
votes
4answers
425 views

Should the bullet trajectory calculated by server or by client? [duplicate]

In a FPS game like Battlefield or Arma, when playing online, should the bullet trajectory be calculated by the server or by the client?
1
vote
1answer
57 views

AS3/Flash Develop - Radial Gravity (character on planet simulation)

I am trying to create a program where a character shape will be constantly drawn towards the centre of a planet shape. I have taken on previous advice into using physics equations to generate the ...
1
vote
1answer
82 views

Implementing time step in main game loop

So ive read both http://gameprogrammingpatterns.com/game-loop.html and http://gafferongames.com/game-physics/fix-your-timestep/ and I kind of understand how I'm supposed to do it, but some parts are ...
8
votes
2answers
400 views

Simulation of supersonic, hypersonic flight with user defined surfaces

I want to create a small rocket-launching game, inspired by Kerbal Space Program. Since there's nothing in orbital mechanics, that I still don't know. I decided to make this as close to reality as ...
0
votes
1answer
121 views

Unity3D - Using AddRelativeForce to push an object forever in zero gravity environment

Ok, I use AddRelativeForce to basically push an object. But it suppose to keep flying and keep accelerating as I hold down the key because I didn't set gravity. I just started Unity3D last month, so ...
5
votes
3answers
223 views

Multiple Colliders in Collision

I have an object that has a front collider, left collider and right collider. When a collision occurs, I notice that there are situations where the front collider and left collider/right collider has ...
1
vote
2answers
152 views

Can I make this physics simulation any faster?

I've made a little real time physics simulation that solves some bodies. CirclevCircle && CirclevOrientedRect I would like someone to tell me if I'm doing something drastically wrong. I know ...
1
vote
1answer
121 views

Rigidbody stuck on the edge of two colliders

could You please help me with that weird bug? I've seen other people's posts about that bug, but I couldn't really understand how to fix it. As You can see, the boxes are standing right next to each ...
0
votes
2answers
49 views

How to apply force to rigid bodys at a specific point?

I am trying to write a physics engine from scratch to get a better understanding of them. It worked pretty good so far, but there is one thing, i can't get my head around: If i have a rigid body ( ...
0
votes
3answers
232 views

How to implement jump in a 2d game?

I am trying to implement jump in a game I have written for android using canvas. I have referred this tutorial for implementing jump. My code is like if(jumpKeyPressed){ jumpVel = ...
1
vote
1answer
80 views

How to get dynamic RigidBody rotation/tilt on uneven platform?

I have a rigid body with PolygonCollider2D which has some complex circular shape and I'm using uneven platform. Im using Following code to move the object forward CharacterRigidBody.velocity = new ...
0
votes
2answers
190 views

How to make rigid body move smoothly on uneven platform?

Right now I'm using Rigidbody2d for the game character along with polygon collider 2D(2d platform game). I'm beginner hope I'm using correct components. And transform to move character from left ...
-1
votes
1answer
98 views

How to disable Camera from tilting when following a game object?

I have a game character object which is followed by camera. Camera is child object of Character. Using rigid body makes the character tilt in slopes and camera tilts too. how do i stop camera ...
4
votes
2answers
75 views

Restricting Maximum Velocity in Space

I'm making a top-down 2D space ship game in which you rotate and thrust. I'd like to impose a maximum velocity for different engine types, meaning that a certain engine can only get you going up to a ...
2
votes
1answer
96 views

Bullet Physics: Difference between Motion State and World Transform

In Bullet Physics, when I create a new btRigidBody, one of the parameters passed to the constructor is the btMotionState, which defines the initial pose of the body. However, if I then later want to ...
1
vote
1answer
134 views

Synchronizing players and game objects in a server/client multiplyer game

OK guys, I have some experience with 2D game development (single player only), so that's fine no questions here. The problem is with multiplayer games. I already read lots of other questions and ...
6
votes
2answers
218 views

How to apply friction vector to acceleration in top-down 2D game?

I'm making a top-down view 2D RPG game, meaning the player can move in any direction on a 2D plane, and I'm trying to implement a somewhat realistic non-orthogonal acceleration/friction physics model ...
5
votes
4answers
96 views

Dealing with collisions across adjacent static bodies

The Problem: I have the following setup: A, B and C are rectangular static bodies in box2d. p is a circular dynamic body in box2d. The movement of 'p' is solely controlled by the current gravity ...
8
votes
1answer
149 views

In a 2D physics engine, how do I avoid useless collision resolutions when objects come to a rest?

In a physics engine I'm developing (for learning) using love-2d, I implemented collision resolutions in this way: FixedUpdate(dt) // I use fixed timestep foreach collide c1 in allNotStaticColliders ...
1
vote
0answers
63 views

why doesn't work this example [closed]

I am new to game development. I was trying to use this http://blog.gemserk.com/2012/07/03/drawing-a-projectile-trajectory-like-angry-birds-using-libgdx/ projectile example in eclipse android using ...
4
votes
2answers
110 views

How do I set angular velocity/torque so that it's pointing to velocity/direction?

Right now, when I spawn a shootable object, it goes like this: Because I just set it's angle to this: float aimAngle = (float) Math.atan2(velocity.y, velocity.x); bullet.setBodyAngle(aimAngle); ...