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

Bouncing projectile off of sprite, the sides work but top and bottom do not

I'm having a problem bouncing a projectile off a sprite, we've been asked to move the projectile using the equations of motions which makes things a little more difficult but as far as I can see what ...
1
vote
1answer
79 views

How do I make circles bounce off each other realistically?

I'm trying to create bouncing balls with realistic physics. At the moment, when the balls hit each other, they bounce back in the same direction they came from. How do I make them more realistic? I ...
2
votes
2answers
70 views

Simulating beer pong physics in Unity

I'm trying to create a simple beer pong game in Unity. The basic idea is this - when it's your turn to shoot, you use your mouse to pick a point on the table that you want the ball to hit and bounce ...
0
votes
0answers
56 views

Colliding of 2 moving objects

I am making 2d Game with my own Physics (without using of Rigidbody - some kind of challenge for me). I have two objects which are moving, and their velocity vectors. I have some unmoving objects. ...
2
votes
0answers
40 views

How to prevent bullets from passing right through entities?

(sorry for bad english) I'm making 2D arcade game. I write all of physics stuff myself. The problem involves bullet behaviour. Imagine bullet flying towards some entity. If the bullet's velocity is ...
2
votes
2answers
606 views

How can I simulate the gravity of a sphere instead of a plane?

How can I simulate the gravity of a sphere instead of a plane? For a naval warfare game, I wish to implement a surface that simulates a curved plane with horizon. The plane is rendered with water ...
0
votes
1answer
19 views

Libgdx bouncy effect in a wall

I have an element inside the screen and I want to set my phone's bounds as a wall where elements are bouncing. I want it to be physically correct. How to do this?
4
votes
3answers
196 views

Sphere to plane collision never rearching resting contact

I have been trying to have a sphere to plane eventually lead to the sphere coming to a resting contact, but my sphere will end up always bouncing forever. It will bounce correctly for the first few ...
0
votes
1answer
41 views

Calculating density of an object

I'm using Box2D for physics in my game, and one of the things it needs to know when creating a shape for a physics body is the shape's density. I had no idea what value I should specify, so I went to ...
0
votes
1answer
43 views

Unity - Joint tearing under larger force

I have a chain that is made of connected configurable joints. I used ultimate rope builder for the rope chain creating. The problem is that when i apply a larger force to the chain, it starts to tear ...
0
votes
1answer
42 views

Unity Rigidbody gets pushed through collider by another rigidbody?

I'm setting up the interior of a house in a 2D platformer. Inside the house is an NPC with a box collider and rigidbody attached, and the house is boxed in by four edge colliders. My character also ...
0
votes
0answers
33 views

How to calculate multiple collision of sphere and triangles?

I have a sphere and a mesh(triangles). When the sphere intersects the triangle, I reflects the vector of speed and everything works fine. But I can't write a good implementation for multiple ...
0
votes
1answer
61 views

Sprite Kit - keeping character level with the terrain 2d endless runner

I've been trying to figure this out exhaustively for the past few days and still haven't found an answer. I have an endless runner built using swift where the character is fixed and the terrain moves ...
3
votes
1answer
102 views

Determine if an object is inside a ship's turn radius, rotation via torque

I have a 3d space game where all ships move around using physics. I am trying to determine if a given object is reachable by a ship at a given velocity and turn radius. I believe the formula for turn ...
0
votes
1answer
29 views

unity3d - Object keeps falling down

I have an object that moves towards another object using this line : transform.position = Vector3.MoveTowards(transform.position, target.transform.position, speed * Time.deltaTime); this is it's ...
2
votes
0answers
54 views

Physics: calculating angular acceleration in world vs local space

I have a pretty simple rigid body simulation written in Python. In my code I calculate the angular acceleration using formula: angAcc = torque * inertiaTensor^-1 (note row-major matrix order) Now, ...
0
votes
1answer
50 views

Collision between a sphere and a mesh(height-map)

I am trying to implement a method that detects the collision between a sphere and a mesh and reflects the vector of speed. I have a method, that detects a collision between a sphere and a triangle and ...
0
votes
0answers
59 views

Implementing wall-sliding physics in THREE.js

Yo, Basically I want to make a 3D environment where the player can walk around a 3D world, and collides with objects / terrain like any other 3rd person / 1st person game. The world can contain any ...
1
vote
0answers
52 views

Calculate Orbit Path/Ellipse given mass, velocity, and distance (2body)

Calculate and draw the path of an orbit in a 2 body problem given the mass, current velocity, and distance of both bodies? We're working in Unity and will be using the default rigidbody.mass to start ...
2
votes
1answer
36 views

(Fat) ray cast with MPR OR GJK?

I know that it's possible to see if a line segment or a swept shape (to make a "fat" line segment) intersects objects using MPR and GJK. Is it possible in those situations to find out the distance ...
2
votes
1answer
47 views

Are GPU physics implementations branchless?

I've implemented MPR on the CPU and in pixel shaders (long story!) and there seems to be unavoidable conditional loops both to find the starting portal as well as to find the final solution. I know ...
0
votes
2answers
45 views

Ball oblique impact physic in Java?

I know Q3 + Q4 = 90 I searched internet and many physic topics, but not found how to calculate this values in Java? (I found V3 and V4 but not found Q3 and Q4) So how can i calculate V3, V4, ...
0
votes
1answer
37 views

Unity 2D Current object force

I'm working on a game with an entity firing a shot. This shot could destroy other entities as well as the entity who generated the shot. My first step was to apply a force to the rigidbody2D of the ...
1
vote
1answer
168 views

Simulation of ball movement in a 3d landscape. The easiest way?

I have a landscape(generated via Perlin noise) and a ball. I want the ball to move along the geodesic(implementation of basic physics: gravitation, friction). I thought to do raycast around the ball ...
1
vote
2answers
85 views

Circle-Circle collision resolution

This seems easy but I can't figure it out, when I have one circle(c1) collide with another(c2) I give the c2 circle the heading of c1 and send the c1 circle on the normal vector to the heading (the ...
1
vote
0answers
73 views

Create a 2D orbit trajectory like in angry birds space and a circular orbit

I am working on a 2D game, and I am working on adding some space physics : I need to find a way to create a circular orbit and an orbit like angry birds space ( the spiral trajectory ) . So there is 2 ...
2
votes
1answer
77 views

Speed needed to make a car jump from a ramp

I need to make a car jump from a ramp to another, and I need this to be done using AI so I thought it would be enough to set a fixed speed for my car when near the ramp, in order to let it jump ...
0
votes
2answers
54 views

(Unity) Physics based movement vs Straight position change

Unity provides a cool physics engine for game development and I want to utilize it in my game. Shorter version I want to use physics engine for everything else other than character movement because ...
0
votes
1answer
43 views

Twin-stick controls for a cohesive group of agents

I'm trying to implement a classic twin-stick controller for a group of physics-based game objects. Here are the rules I'm trying to follow: Agents always stay close to each other within a certain ...
1
vote
1answer
36 views

Correct way to integrate scaled axis angular velocity into a quaternion

Across my travels on the internet I have came across to ways of integrating a scaled axis angular velocity into a quaternion. The first way converts the angular velocity into an axis angle quaternion ...
0
votes
0answers
59 views

How to slow down a Sphere smoothly in a world controlled by force and stop it (Unity 5)?

I am a beginner and I started to use Unity 5. I play with tutorials on the site and documentation. I was basically testing springs, physics materials etc. I have a problem understanding probably a ...
0
votes
0answers
19 views

How do I find at least the closest penetrating point with SAT? [duplicate]

For more accurate simulations, I want to find the closest point of another polygon to one polygon's center when they collide. Is this possible with the SAT algorithm? Is it a good strategy at all for ...
-1
votes
1answer
45 views

How do I calculate force from collision between 2 rigidbodies in 2D?

I have a physics engine based on the Game Physics Engine Development by Ian Millington. In chapter 7.1.1, it provides the formula: V = (pA.Velocity - pB.Velocity) * (pA - pB).normalized where V is ...
0
votes
0answers
28 views

JBullet Only Updates Position when I update it in Code

The title is a bit weird...but here it goes: I have JBullet configured so that I can move things in my code, as the game tick structure is something like this (the update code located in ...
0
votes
0answers
58 views

(LibGDX/JAVA) How can I get a rectangle to rotate with this pendulum so I can start detecting collisions?

One of the objects in my game is a pendulum that swings in a semi-circle. This is done by having an update() method like this: public void update() { angleAcceleration = +1.81 / length * ...
0
votes
1answer
49 views

JBullet move object rigidbody in code?

I am trying to move an object's Transform (of a coded class, these are for the rendering engine), then convert it into a JBullet Transform. After that, I try to apply any movement to the JBullet ...
1
vote
3answers
110 views

Calculate intersect point / aim point

I'm working on a simple game, and I need to calculate the position to aim. Since my math days are a bit behind me, I put together a simple example to illustrate: So given that I know the position ...
2
votes
2answers
85 views

Why doesn't this 2d physics calculation yield the desired jump height?

I found a formula for gravity and jumping in this article: http://error454.com/2013/10/23/platformer-physics-101-and-the-3-fundamental-equations-of-platformers/ I implemented this formula and ...
0
votes
0answers
41 views

Leapfrog integration vs Euler integrator

I am looking at various integration methods for my n-body simulation and I'm slightly confused about actual implementation of leapfrog integration. According to the wikipedia page leapfrog method is ...
1
vote
1answer
485 views

Is there a javascript physics engine that does not require canvas? [closed]

I just need a really simple and small physics engine for squares or circles that moves images using javascript. For the project that I am working on, I can't use canvas, so I will be moving the images ...
2
votes
2answers
483 views

Can Unity 5 or Unreal Engine 4 do computationally identical physics simulation across platforms?

In order to use certain approaches to multiplayer physics, it requires that the clients calculate exactly the same values for physics simulations. That "exactly" is a very big word here and goes all ...
0
votes
1answer
249 views

Unity 2D - Pixel perfect movement using physics

I'm trying to make a game in the style of many NES games and I'd like object movement to do two things: I want to move an exact number of pixels per update. I want, for lack of a better term, ...
0
votes
1answer
47 views

How to use friction to bring object to a stop in a simple 2D platformer?

I'm coding the physics for a little platformer I'm making but I'm not sure how to design a friction calculation that does what I expect. When running along a platform I want the player's character to ...
1
vote
1answer
43 views

CGVectorMake to move SKNode at a certain speed towards the middle of screen?

I am trying to launch my ball sprite towards the middle of the screen at the same speed every time I launch it. let vel: CGFloat = 1000 dx = size.width / 2 - ball.position.x dy = vel - size.height / ...
0
votes
4answers
70 views

How do I figure out if a point is infront or behind my vehicle?

I need to figure out whether a point is infront or behind my vehicle. I have the vector of it's position, forward direction. So far I have tried finding the vector perpendicular to its forward ...
0
votes
2answers
69 views

Moving OBB vs. triangle intersection test

Requirements: to write a test function that, given a moving OBB (oriented bounding box) and a triangle, returns true whenever the OBB hits the triangle. The OBB is described by its half extents (h1, ...
0
votes
1answer
66 views

Spherical Collision

I have a made spherical collision system which creates a major problem, the balls gets stuck to each other on high speed and sometime with low speed collisions. I researched a lot but I couldn't found ...
1
vote
0answers
89 views

How do I implement realistic recovery from weapon recoil?

I want to create an equation determining how fast a gun recovers back to its center after it has fired. I have a weapon system functioning based on constants (recoil amount, bullet spread, etc.) ...
1
vote
1answer
211 views

Estimate the time it takes for an object to travel from point A to point B

I have an object with vec2 position, velocity, and destination with 2 variables maxspeed and acceleration. In each step, its position is calculated as follows: vec2 desiredVel = destination - ...
1
vote
2answers
60 views

Gravity Simulation failing at short distances

I have a 2D space simulation with gravity acting on three bodies (e.g. sun and 2x planets). The simulation seems pretty stable with RK4 (was unstable with Euler). The problem arises if the orbit of ...