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
2answers
100 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
75 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
54 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
75 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
126 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
122 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
199 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
73 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
149 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
54 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
70 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
78 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
123 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
170 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
195 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 ...
0
votes
0answers
27 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
111 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
59 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
42 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
97 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
47 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
73 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
5 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
54 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
224 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
111 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 ...
4
votes
1answer
69 views

Apply delta time to physics correctly

So I'm trying to create a simple physics engine for the game I'm creating. I'm trying to add jumping to the game. To do this I used (where jumpPower is 30000): impulses.emplace_back(0.0f, mass * ...
5
votes
1answer
124 views

Finding new position after collision with multiple colliders

What is the most accurate way to find the correct position to where a moving character should be re-positioned as a collision-resolution, after it has collided with multiple colliders? The figure ...
2
votes
1answer
72 views

How to detect if an object is upright?

I have a cartoon car and it has a skid sound with the car skids. But when the car flips over the skid sound plays endlessly and its really annoying. I have a basic script that is meant to detect when ...
1
vote
0answers
51 views

Character Movement and Collision with Ragdoll Rigidbodies/Colliders?

I have a player character that I'm moving with a character controller script and it is moved by applying velocity to a Ridigbody. This works when I have a rigidbody component on the player but my ...
1
vote
1answer
93 views

Acceleration problems

Im trying to make a car game, but i cannot get the acceleration code right. With this code: if(gas){ speed += 3; }else if(break_ && !(speed < 6)){ speed -= 3; ...
2
votes
2answers
88 views

Unity Ragdoll Colliders don't collide

I have a humanoid character with Ragdoll setup in Unity. However the box/capsule colliders on the various parts of the body don't collide with other static geometry. They do collide with the ground ...
3
votes
1answer
49 views

How does server correct late input

Imagine the following scene: The height one player can reach on jumping depends on how much time the button for jumping is pressed. When the player jumps, the input is sent to the server and physics ...
1
vote
0answers
36 views

Are there games with player programmable vehicle control behaviour? [closed]

My question Are there any (space/flying/driving) games where the player can customize the mapping between player controls and the input to the vehicle actuators/engines programmatically? (Yes or no.) ...
2
votes
1answer
68 views

EULER Integration

I'm a little confused over using integration to move a sprite. This is how I've always achieved this: float time = 10f; //Number of seconds to pass a pre-defined area (using the screen width in ...
3
votes
1answer
58 views

PhysicsJS on mobile devices: how to optimize for speed

I'm (physics n00b) developing a small animation (gamification) in a mobile HTML5 app (PhysicsJS, HTML5, Cordova, Ionic, JavaScript). This animation is derived from Basket of verlet constraints. This ...
2
votes
1answer
60 views

2D Change Velocity Based on Distance XY While Moving Parabolic Arc

What I'm trying to achieve is that the entity moves in a parabolic curve, and no this has nothing to do with gravity before you ask. I give the entity a target position which it should move to, but ...
1
vote
0answers
54 views

How to disable static friction in Box2D?

I'm making a 2D platformer. One of the issues is that when the character hits the ground, there's an initial pause and then the character finally slows down to a halt. I believe the initial pause is ...
0
votes
0answers
43 views

How to avoid ai hands or any body part going inside wall or ground? (Unreal Engine4)

Whenever my character get killed near wall his hands or any body part its goes through the wall making it look like half of the hands front of wall and another half through back. but i dont like it.. ...
6
votes
1answer
131 views

How do I set an object's speed to arrive in X seconds?

I want to move an object to a point in the game world, I have the distance value which is far the player should move. I want to complete the movement in X seconds. I have tried many equations and ...
1
vote
1answer
136 views

Quake 3 Gravity

From "Quake 3 Networking Primer": The server accepts client commands as they arrive. It makes one call to the VM per client command. This is the only time that players are ever updated. ...
1
vote
3answers
202 views

What are the basic equations in 2D physics collisions?

I'm making a 2D fighter, and I have gotten a basic engine, but right now I need to add the collisions, but I'm sure a basic AABB check will not be enough. I'm sure it needs some basic 2D physics ...
6
votes
4answers
325 views

Rotating sprite around another sprite

I am building a pool game, and I want to make the cue rotate around the white ball. Here is the live code: http://199.26.84.223/nocol.html Here is the code for the white ball: balls = ...
3
votes
1answer
77 views

Collision happens even though the objects are not colliding according to what we see

I'm trying to build a pool game as my first phaser project. The biggest challenge today was to make the cue rotate around the white ball. After hours of searching and not finding anything useful ...
3
votes
1answer
225 views

Switching from Arcade to P2 physics in Phaser

so i just started using phaser for test i've followed the tutorial in the phaser website (making-your-first-phaser-game) everything is clear no problem . but since i've making a pool game i need ...
0
votes
2answers
86 views

Slingshot gravity effect

I am trying to make a sling-shot that fires a projectile. I want it to act like the standard sling-shot in angry birds. So far I managed to get the "pulling" effect, ie. If I draw backwards it fires ...
1
vote
0answers
74 views

Bird flight simulation (physics)

I tried to search something about bird-like animal flight simulation but it looks like everything is spammed with flappy bird 2D questions. I want to have in my 3D game bird-like animals with ...
1
vote
1answer
44 views

In Physijs, how do I detect that an object is still?

I have a cylinder that simulates a flipping coin. I am using Physijs. The coin might bounce off the surface multiple times before stopping. How can I know when the coin has completely stopped moving?