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
vote
1answer
39 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
39 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
1answer
76 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
37 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
63 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
86 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
42 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
38 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
55 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
30 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
44 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
30 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
91 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
181 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
52 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
38 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
70 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
36 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
22 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
37 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
31 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
72 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
91 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
117 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
43 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
72 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
47 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
83 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
192 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
49 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 ...
0
votes
1answer
51 views

Launch Velocity for Simple 3D Projectile [duplicate]

This is a pretty easy question, but I can't quite figure out the answer. I have: The initial position of a projectile. The gravity vector. The (stationary) target I want to hit. A maximum launch ...
5
votes
1answer
192 views

How can I implement large moving “colossus” characters that also act as environmental objects?

I'm curious how enormous characters that act both as entities and environments are implemented. I'm thinking of characters like in Shadow of the Colossus which move, but which the player can also ...
1
vote
3answers
90 views

How to make an object oscillate left and right?

I can't seem to make an object move left and right, back and forth, on room start whilst on solid ground. Codes I used: Step Event: if image_index is greater than 5, then physics_apply_force ...
0
votes
0answers
20 views

Impulse resolution with varying time delta

I thought I'd try building a basic 2D physics engine, and I'm currently writing the impulse resolution part of it (yeah, not very far into this). Using quick internet tutorials like this as a guide, ...
0
votes
2answers
114 views

Trajectory of a spinning ball

How do I would precalculate trajectory of a kicked ball, when it's spinning? I'm applying spinning using simplified Magnus effect every frame like this and it works: acceleration += swerve × ...
8
votes
3answers
156 views

Physics simulation methods for large delta times?

What physics simulation methods are most suitable for really big delta time (hours to weeks)? In addition, would I face any problems combining different methods for big and small delta times?
12
votes
4answers
505 views

How could I constrain player movement to the surface of a 3D object using Unity?

I'm trying to create an effect similar to that of Mario Galaxy or Geometry Wars 3 where as the player walks around the "planet" gravity seems to adjust and they don't fall off the edge of the object ...
2
votes
1answer
96 views

2D bouncing ball simulation - angular velocity

How does angular velocity of a ball affects it's speed after a bounce? I'm trying to simulate 2D bouncing ball physics. I've found a nice solution how to calculate ball's velocity after a bounce: ...
1
vote
1answer
66 views

Simplified aerodynamics for 2d (top-down) airplane

I am writing a top-down 2d game, in which the player can control an airplane via the WASD keys. The W key should move the plane upwards (north), the A key to the west, and so on. Now I need a ...
0
votes
1answer
144 views

Jump Issue(Unity3D)

This is my first character control script. Where a cube is my player and the objective the i want to achieve with my script are 1.the cube moves in horizontal axis till the button is pressed once ...
3
votes
1answer
296 views

Change unity physics engine speed

Is there a simple way to change the speed* of unity's physics engine like in the game SuperHot? Any script language is ok but javascript is preferred. *I am not sure if speed is the correct term.
1
vote
2answers
123 views

How can I handle position in an entity system where position can be 2D or 3D?

I'm working on a game engine to learn how it's done (so I might better take advantage of the techniques involved and other, similar engines in the future), and I've run into a problem when handling ...
3
votes
3answers
129 views

Sound Synthesis from object collision in Virtual Reality Environment

I have a project whose subject is "Sound Synthesis from object collision in Virtual Reality Environment" First of all, I have to define some objects with certain attributes (like shape, mass, ...
0
votes
1answer
32 views

Using box2d with starling

In my game I have a Main class in which i am initializing starling framework by passing Game class like below myStraling = new Starling(Game , stage); In the game class I have Instances of Welcome ...
1
vote
0answers
301 views

Getting child collider when collision occurs in compound object in unity3d?

I have a compound object. The parent of the compound object hierarchy has a script that is listening to the OnTrigerXXX callbacks of the children. When this compound object collides with other objects ...