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

-1
votes
0answers
26 views

Simulating wind effects in a tree, falling fruit etc [on hold]

I have a project that requires me to simulate trees moving in the wind. Can anyone share any examples, regardless of software? Would it be better to use a 2d or 3d framework?
0
votes
0answers
26 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
94 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
76 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
18 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
438 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
311 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
106 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
45 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
21 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
67 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
54 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
61 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
70 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
187 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
1answer
45 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 ...
0
votes
1answer
58 views

Making a gameObject push the player

I am working on a Unity 3D game for Oculus and I have problems with making my objects to apply physics on a player. So getting rid of a CharacterController and using something like a rag doll is not ...
3
votes
2answers
131 views

2D Physics: What happens with torque when center of mass changes?

Novice programmer and explorer of simple 2D physics, here. I have a simple 2D object made up of two rigid bodies connected at a fixed joint. The two rigid objects can rotate freely about that fixed ...
0
votes
1answer
41 views

Rotate a plane defined by its normal and its distance

First apologies for the amount of pictures, it's a bit hard trying to explain my problem without pictures. Hope I've provided all the relevant code. If you feel you want to know about how I am doing ...
0
votes
0answers
84 views

Anti-Roll bar doesn't work

I'm making a racing game in Unity that has trucks as vehicles. For the truck movement, I'm using WheelColliders. After some testing, I found out that after a certain speed (~60km/h), turning made the ...
2
votes
1answer
107 views

Unintended sliding blocks Unity (5) physics

A game I'm working on right now relies on the Unity physics system for collisions, gravity etc. This all works well except for one strange thing. When an explosive is placed on a stone cube, it'll ...
0
votes
0answers
48 views

How can I handle ball interaction with lanes in a pinball game?

In a pinball game, how can I handle collision or constraints on the ball for convincing movement on those highway rails/tracks? I assume using physics and a mesh collider would not work, even when ...
0
votes
1answer
41 views

Dragging an object and moving it back to it's original position on release?

I'm making a small game, and I'm trying to add this mechanic where if you click on an object and move it, then you release the object it will snap back to it's original position. Currently, each ...
2
votes
1answer
57 views

How to restrict jumping to a single jump?

I'm making a VolleyBall game in HTML5 with PandaJs GameEngine and plugin is used physics and Box2D. The problem is that players can jump, but they can jump over the net with multiple jumps. I have ...
0
votes
1answer
49 views

LibGDX - Executing 2 different touchDown events in the same method

On the bottom left of my screen is a circle with an Arrow and on the bottom right is a circle with a gun. If the player is in jetpack mode and the Arrow "button" is clicked he flies like flappy bird ...
0
votes
1answer
55 views

How to reference the right object in Unity

So, I'm developing this small 2D project where I have a sphere that detects if objects get close to it from three different directions. I have successfully found a way to detect if an object ...
0
votes
1answer
38 views

Getting distance between point of an object and another object in Unity

First, I'd like to apologize because this is a very basic and repetitive question, but I am completely new to game development. I understand that I can find a distance between two objects using: ...
0
votes
2answers
116 views

Realistically drivable car

I want my car to be realistically drivable (like in real life...) Unfortunately all I did so far is Rotate the whole vehicle using A and D; and AddForce in forward-backward direction using W and S ...
1
vote
3answers
204 views

How to implement accurate frame-rate-independent physics?

So, I have been working on a project for a while now and recently stumbled across a problem: The common approach to frame-rate independent physics is to either use a fixed update interval (ie. Unity) ...
0
votes
1answer
57 views

How do I get realistic sliding contact between objects in a voxel grid?

I have a 3D grid of voxels in my game. Entities walk around with simple physics that represents them as an axis aligned bounding box with velocity, mass and acceleration. The way I'm doing collision ...
0
votes
1answer
43 views

How to move a car model on a plane?

I want to create a 3 dimensional car game. But i have a problem in moving a car in other directions and accelerating. I have a car model and a road model placed appropriately. To move car forward, I ...
1
vote
1answer
74 views

What is the purpose of integration in physics engines?

All online resources seem to assume that you know what this means and/or state that this is related to object movement in some way. How does this differ than just position.x++ and position.y++ and ...
0
votes
1answer
50 views

Immovable object impact physics

I am trying to do some physics calculations from scratch, and as a result am creating a small bouncing ball example. However, I have some issues getting correct results from my impact physics when the ...
0
votes
1answer
34 views

Box2D: Making it Determinsitic?

From articles on the web, I found that floating point math generally has accuracy of at least 6 digits. With this in mind, is it possible to make Box2D which uses floats fully deterministic through ...
1
vote
1answer
39 views

Finding the side of a shape a ray intersects

For some simple 3D shapes (cubes, prisms) how can I determine which side a ray intersects, knowing the direction of the ray, and the normals of the shapes' sides. I thought of using plane ...
0
votes
1answer
49 views

Physics-based rotation with an array of pixels

Say I have a simple system, that has a large array of pixels with their own weight, velocity, coordinates etc. (by using classes) if each of those pixels can be connected to 4 other pixels (top, ...
0
votes
0answers
48 views

moving a character in sprite kit

So I've created a game in which a number of tiles are created from a txt file to create a level for the player to navigate through, but I'm having trouble moving the player. func ...
0
votes
0answers
16 views

Java JBullet models not colliding [duplicate]

Hello I wan't to do model collsion in JBullet but that don't won't to work. Models look like have some invisble holes. Here the code for creating collsion shape: int triangles_count = (int) ...
0
votes
2answers
75 views

Why does this simple if-statement that checks my main characters state never get called (Java/LibGDX)?

Been working on this for a while - basically I want my player to perform a front flip when he jumps (screen tap -> player jumps). I wrote the animation class Animator (extends Player implements ...
2
votes
1answer
114 views

Frame independent buoyancy using Substepping

I am having trouble with a frame independent buoyancy force using substepping in Unreal Engine 4. The original problem (which I am attempting to solve using substepping) is that when you apply a ...
0
votes
0answers
40 views

Stuck on a steering problem

i'm building a car game, and currently working on the steering. i would like to change the motion of Z rotation so that the car rotates around the Z axis when the wheels are turned. I can't set the ...
-1
votes
2answers
120 views

Does conservation of energy exist in most physics engines?

The reason I am wondering, is because while trying to create gravity around a point in the physics game I am creating, I wondered "If I create an object in the middle of the screen, where would the ...
-1
votes
1answer
47 views

Relative movement in Box2D (keep object from falling off planet)

I'm creating a game with planets orbiting around a sun, like this: The brown square is the earth, rotating around its center and around the sun. The yellow square is the sun, which doesn't move. Now ...
0
votes
0answers
13 views

How to experiment for the value of gravity in Libgdx? [duplicate]

I am following a guide on how to play a flappy bird clone in the LibGdx framework. -http://www.kilobolt.com/day-5-the-flight-of-the-dead---adding-the-bird.html I am currently on the part where the ...
0
votes
2answers
80 views

How do I derive an appropriate acceleration value for my game?

I am creating a Flappy Bird clone from this tutorial. I have a question about acceleration in libgdx. The author assigned the bird a constant acceleration vector in the constructor of the bird ...
0
votes
3answers
52 views

[Unity]Avoid boucing when ground move down

I have a sphere & a quad, when the quad move down, the sphere fall after and bounce back continuously. I dont want to change my project setting like bounciness, gravity,mass and I need the sphere ...
0
votes
0answers
39 views

How to get rid of “ghost mode”?

I've got few Spatials (mostly boxes) in my space. Player is able to move main Spatial using mouse or keybord. But now every Spatial can go through another. Like in a ghost mode. How can I get rid of ...
0
votes
1answer
106 views

Custom arcade physics rate (e.g. bullet time)?

Is there a way to modify the rate that physics is applied, either globally or on a per-sprite basis in Phaser? That is, how can I slow down or speed up the rate at which sprites move around, or fall ...
5
votes
1answer
228 views

Programming Dynamic 3D Water/Waves?

I'm a little bit stuck on how I might go about programming dynamic, interesting water in a game. To qualify that a little bit, I'm interested in creating water with broad, rolling waves that affect ...
0
votes
0answers
51 views

Calculate hit-normal from collision

I am trying to implement a swept test collision between an AABB and a Line Segment and I found this implementation working great ... Except that it doesn't cover how to calculate the hitNormal and ...