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

Ball Speed is not increasing as per code

I am working on small project , but now I have a problem . The problem is The Player speed (Ball speed) is not increasing as per the code . In the beginning ball speed increases , but as the time ...
2
votes
2answers
192 views

How to stop sinking bodies in physics engine C++

I'm writing a rigid body simulation in C++, and have come across a problem when an object should come to rest on the ground. Because gravity is being applied to it's velocity, the object starts ...
2
votes
2answers
124 views

Calculating initial velocities given trajectory parabola

I'm working on a volleyball game but my maths/physics knowledge isn't quite up to par. I need some help with the following problem: The player can hit the ball from anywhere on the left of the court ...
1
vote
0answers
36 views

How to find or compute or look for overall/max RPM by simply checking for rotation?

I find it hard to determine the wheel RPM since I'm only making a simple 2D game of rotating object via Z-axis. I wanna try this solution but I got no change since I'm trying to find the RPM from a ...
1
vote
0answers
64 views

2D Platform physics system with deltaTime

I'm implementing my physics handler in my own 2D "Platform" game. My main problem is that when the timestep ( deltaTime ) changes, maybe to some tiny lag spike or something like that, the running ...
0
votes
1answer
83 views

Use constant force to hold something in position

This may actually be more of a Physics.SE question but since im doing this in Unity I figured I'd ask here. I am playing around with the Constant Force component and have a sphere constrained with a ...
0
votes
0answers
80 views

Unity Player Smooth Left - Right Movement

I am learning Unity 3d . Now I want to move the player object (The Ball) , Left and right by Left Arrow and Right Arrow key . I want smooth movement when the player goes left , but I don't know how to ...
1
vote
3answers
90 views

How do I make a box don't slide up/walk normally on a slope?

I'm trying to implement slopes in my game. When I walk up the slope and suddenly stop, here is what happens: And when I move down, it goes like this: I have set density to 0.5, friction to 0 on ...
1
vote
0answers
71 views

Bullet Physics: Applying a force at the point of collision

Suppose I want to simulate some kind of gripper with two "fingers" (such as pair of pliers, or two-fingered robot hand), picking up an object from the ground. Both the gripper and the object are ...
-1
votes
3answers
981 views

How does a car earn nitrous in racing game?

Take the case of Need for Speed, why would a car earn nitrous gas by drifting or by flying in the air? What's the rule of collecting nitrous in other racing game? Is there a general formula within ...
1
vote
0answers
80 views

Should I compute impact damage with energy or momentum?

My game uses physics (Box2D in particular). Just about every object in the game can be destroyed, and the primary method of combat is by slamming objects into one another at high speed. It makes ...
1
vote
1answer
79 views

3D Planetary gravity

so i am making a thing in javascript and i want to have planetary gravity in my "universe". But when i use an equation to calculate the acceleration by gravity i get one number. That is how fast the ...
0
votes
1answer
74 views

Bullet Physics Collision is Not Detected

I have created two btConvexTriangleMeshShape objects. One is a cube of size (0.1 x 0.1 x 0.1), and the other is is a plane of size (1.0, 0.1, 1.0). The plane is static, and the cube is dynamic, and ...
0
votes
0answers
47 views

Interpolating positions between FixedUpdate frames in Unity?

Lockstep Framework uses FixedUpdate () in Unity to match an assumed fixed timestep. At higher rates, FixedUpdate doesn't at all run at a fixed rate but instead runs multiple times in a single frame to ...
1
vote
1answer
206 views

Configurable Joint, linear limit range

I am working on a physics driven pressable button, but I cannot seem to tackle the minimum and maximum limits. This is the rig I have set up for the button (as it looks when pressed down). 2D view: ...
0
votes
1answer
60 views

How to Create levels in game in libgdx [closed]

I am create trying to create a Android game using Libgdx. I want to Create levels in game . So what i do. Which classes i need to use and how to create them explained. Plz help.Also i want to add ...
0
votes
1answer
93 views

How to predict future position of an object(bullet sync)?

There is a multiplayer game and server sends to all clients a message when a shot happens, containing bullet position, bullet velocity and timestamp. By having timestamp, we can calculate the lag, ...
0
votes
1answer
126 views

Can this script be edited to create a “shotgun” type spread when firing? [Top down shooter]

I have this code and I'd like to add a shotgun to the game by slightly modifying the code. I've looked online for any example but everything I find is for FPS not a TDS. void Shoot () { timer = ...
0
votes
0answers
41 views

How can I change my angular momentum correctly using Unity3d physics?

This is an odd question to ask here, but I've almost been pulling my hair out trying to solve this. Plus its more of a mathematical/physics problem than a programming one. I'm trying to implement ...
6
votes
1answer
195 views

Why do Physics Engines use collision margins?

When using a physics engine in a game (such as Bullet), you usually need to define a collision margin for each object. I'm a beginner to game development, and I don't understand the purpose of a ...
3
votes
2answers
87 views

Test if Jump can reach target

I have an object that can jump. When it jumps, its Y velocity becomes -600 (pixels/second). For up to .2 seconds, it can ignore gravity. After .2 seconds, it begins to accelerate downward at 2100 ...
3
votes
3answers
69 views

Computing a full revolution for an arbitrary orbit?

I'm making a game in which the goal is to get as many planets as possible to orbit around a star. The user launches planets at any distance away from the sun (as long as it's on-screen), and in any ...
0
votes
2answers
183 views

OnTriggerEnter() without rigidbody?

I know this is an old question and it has been answered for a lot of people. Unfortunately none of the solutions apply to the problem I seem to have with rigidbodies. I have a moving AI character and ...
0
votes
2answers
56 views

Newton physics “hiding” rigid bodies

It seems like creating a bunch of rigid bodies (say 100K) causes a huge slowdown. However, what if the model the rigid body is attached to isn't visible. Is there a way to remove the rigid body from ...
-1
votes
1answer
76 views

Box falls extremely slow? (~1 pixel per second)

As the title says I have a problem where my box2d bodies falls extremely slow. Around 1 pixel per second. My world is stepped like this world.Step(1 / 60.0f, 8, 3);, each frame. The way I update ...
0
votes
1answer
55 views

Calculate Jump Limits

My question is in a similar vein to this question, I am creating a pre-mapped pathfinding solution much akin to how Ash Blue was for my 2D platformer-style game (in XNA). As part of the process, I ...
0
votes
2answers
88 views

How to adjust my games speed to fps [duplicate]

Hi so i am making a small sort of physics engine, but if your fps is really slow the physics will update slower and objects will move slower. How do i make the speed of objects greater if the fps is ...
8
votes
2answers
157 views

Calculating Linear force required to hit a specific vertex on a parabola

The idea is a user presses somewhere on the screen and the program will fire an object in a parabola shape from a defined start position that has it's vertex where the user touched the screen. I have ...
0
votes
0answers
9 views

What is vector<E> how to use in android java [duplicate]

I making game i want use vector into velocity,position and rotation. But i don't know how to wark vector so please help. Thank you
9
votes
1answer
139 views

2D Physics: storing previous position vs storing velocity

I saw a number of 2d game tutorials and books where previous position of an object was stored in state instead of velocity vector. Velocity is then calculated each frame as a difference between ...
2
votes
1answer
224 views

Why do my Box2D bodies not fall, even though world.step is called?

I have SFML set up with a Box2D world that has gravity, but my bodies won't move. I std::cout'ed the position of the body in the game loop, but it's always at (0, 14)! No errors or warnings, just no ...
2
votes
2answers
80 views

Cant jump from ground collision

I have a character that starts in the air and applying gravity to it to collide with platforms in my level. At the start, the character gradually gains speed descending until it collides with a ...
6
votes
2answers
165 views

Is this a correct backward Euler implementation?

I want to simulate a mechanic object like this: init acceleration a; init velocity v; init position x; loop { get delta time dt; v = v + a*dt; x = x + v*dt; } I use the velocity (which is the ...
0
votes
0answers
55 views

Trying to get Box2D bodies to fall [SFML, Box2D, C++] [duplicate]

As the title says I'm trying to make my Box2D body to fall, but it won't work. It just stays at the same position. Sorry for the long codes but I have no idea where I'm doing something wrong, so I ...
2
votes
1answer
143 views

Unity 2D Hingejoints break under extreme force

I have added a rope to my game that is made up of multiple small gameobjects, each connected to eachother by a HingeJoint2D. Since 1 unit of mass in Unity is supposed to represent 1 kg, I've made the ...
1
vote
1answer
100 views

Bullet Physics / OpenGL Meshes Not Colliding

This is for a school project, and I'm having a bit of trouble with Bullet acting strangely. I have an OpenGL project with Bullet Physics library working with Assimp model loaders and Magick++ ...
3
votes
1answer
141 views

How to prevent accelerating along wall during 2d sliding collision response

I'm writing a simple 2d physics system using a circle colliding with edges. When the user presses a key the circle's velocity is incremented by some amount in the direction they pressed. There is ...
6
votes
1answer
227 views

Orbital mechanics: orbit as a function of time. Universal variable formulation?

I am trying to model a two dimensional orbit for a two body Kepler problem but have gotten stuck when introducing the time variable. For a satellite with known semi major axis (a), eccentricity (e), ...
3
votes
3answers
238 views

How do you apply relativistic physics to a 4x strategy game?

I had the big idea of trying to create a hard science fiction 4x strategy game (with the obvious space setting), which is supposed to simulate a realistic way of creating interstellar societies while ...
1
vote
0answers
49 views

Finding the components of Proportional Navigation in 2D

So, I've been scouring this, the Physics Exchange, Wikipedia, and the general web for information about Proportional Navigation, and I can't seem to wrap my head around how to find the individual ...
3
votes
1answer
144 views

Data oriented design in physics engine

I am new to data oriented design and I am currently developing a physics engine as a hobby project. I am really interested in data orinted design but I am not sure how to apply data oriented design to ...
3
votes
1answer
65 views

Do physics engines take shape into account or they operate solely on predefined variables?

I have never given it much of a thought about how physics engines operate behind the scenes. Though, I am currently working on a game that would greatly benefit from as precise as possible physics ...
3
votes
1answer
49 views

What does maximum normalized frictional force mean in this tutorial?

I tried following this tutorial: https://nccastaff.bournemouth.ac.uk/jmacey/MastersProjects/MSc12/Srisuchat/Thesis.pdf, but in page 19 I ran onto a problem - I don't understand the step 4. It is also ...
0
votes
2answers
102 views

Connect phone to computer? [closed]

In order to test out my game, I need to use my real life device. The problem is, android studio isn't recognizing my device plugged in: The problem: My device isn't getting detected in android studio ...
0
votes
2answers
50 views

Why is my gravity script repelling and not attracting?

I'm currently working on a small simulation of Newton's Law of Gravitation in Unity3d, and it seems to be working pretty well, except, it's doing the opposite of what I expected. Instead of attracting ...
3
votes
1answer
80 views

Get collision time between two moving, non uniform Axis Aligned bounding boxes

I have a problem finding the exact time of collision of two possibly moving or static objects. Both objects have AABB data (HalfExtents, Min, Max, Center vector and stuff) and a velocity vector. The ...
0
votes
0answers
12 views

SpriteKit Obj-C – How to add a force on a node a certain distance according to screen size

I have an SKSpriteNode that I'm trying to throw up to a certain point on the screen. I've tried applying an impulse and/or force according to the screen size, but that has strange results. I've also ...
3
votes
2answers
69 views

multiple contacts for SAT collision detection

I have implemented SAT algorithm for obb-obb intersection and I am able to generate a contact for this collision type. My problem is that SAT only generate ONE contact and in many situation I need ...
4
votes
3answers
237 views

Writing my own gravity

I am writing a little game engine in LWJGL. I want to have a gravity, but I don't know correct equations. Let's assume that I've got a 3D vector marking gravity force in each axis(e.g. Vector3f(0.0, ...
3
votes
1answer
210 views

Bouncy Ball stops without enough force

I am building a 3D Pong clone and want to implement a frictionless bouncing ball. These are the steps i took: Create a box in which the ball can bounce, consisting of standard cubic objects. Create ...