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

3
votes
1answer
143 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
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 ...
3
votes
1answer
64 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
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
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 ...
3
votes
1answer
206 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 ...
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 ...
1
vote
1answer
97 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
1answer
87 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 ...
3
votes
2answers
68 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 ...
0
votes
0answers
11 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 ...
1
vote
2answers
2k views

Slope polygon collider 2D causing box collider 2D to 'bump' while sliding on it

I'm doing procedural terrain generation. So far I've created the mesh, and attached a 2D polygon collider to it. The terrain is made up of hills going up and down. After doing so, I put a 2D rigid ...
5
votes
1answer
140 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 ...
3
votes
2answers
239 views

How to calculate faces involved in collision (Separating Axis Theorem)

I have a game engine created in javascript (https://jsfiddle.net/4gqsq8wf/) which uses collision detection via the Separating Axis Theorem. Currently, it does not have any means of resolving velocity ...
1
vote
1answer
145 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. ...
0
votes
1answer
319 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 ...
1
vote
0answers
92 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
3answers
5k views

Collider2D and Rigidbody2D, how do they work?

I have been learning JavaScript and Unity for a week now. I learned how to make Cube as a Ground and another Cube as a player and I used this code to make the Player Cube move forward and backward and ...
3
votes
1answer
50 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 ...
7
votes
1answer
138 views

Path following with Asteroids-like movement. Time to complete path

I'm currently learning about how to do this, but it's best to post the problem beforehand. (posting on Physics and GameDev, as you guys know your math) It's quite difficult to explain. This specific ...
2
votes
4answers
325 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 ...
1
vote
0answers
39 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
71 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 ...
-1
votes
2answers
420 views

How to design basic physics and movement behavior for 2D platformer?

I want to make a simple 2D platformer. I know some basic 2D physics and how to implement them in a game. How to make a character jump, accelerate, decelerate, etc. But I have no idea how to actually ...
2
votes
1answer
84 views

Restricting body movement withing a specific length while dragging a gameobject in unity

private void OnMouseDrag() { Vector3 screen_sp=new Vector3(Input.mousePosition.x,Input.mousePosition.y,screen_space.z); Vector3 cur_pos=Camera.main.ScreenToWorldPoint(screen_sp)+offset; ...
6
votes
4answers
394 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 = ...
1
vote
0answers
64 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
45 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.. ...
2
votes
1answer
170 views

GameMaker: Studio - Slow down calculations

I currently have an orbital simulator, with a brilliant answer in another Game Development question here, and would like to know how to slow down the calculations of Game Maker, to be able to do more ...
4
votes
3answers
937 views

Calculating torque required to turn an object to a target rotation, depending on timestep

The function below works fine, when the timesteps of the physicsengine are short enough for the function to update often. It determinates when the ship(the object) needs to start decelerating to reach ...
6
votes
1answer
135 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 ...
35
votes
2answers
7k views

Water/Ocean simulation and physics

I'm looking for some references about water simulation, and how to model it's interaction with bodies (like boats, ships, submarines). I've found a lot of references on the visual aspects of water ...
3
votes
1answer
89 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
501 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 ...
2
votes
1answer
945 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 ...
0
votes
2answers
106 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
1answer
64 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?
1
vote
0answers
110 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 ...
0
votes
0answers
20 views

Box2D revolute joint positioning

I'm trying to auto test some basic assumptions about how bodies tied together with a revolute joint should be positioned: void tst_GameController::physicsJointInitialPosition() { ...
1
vote
0answers
32 views

Collision detection for multiplayer game with MatterJS

We are developing JavaScript multiplayer top down game where characters can move freely and collide with each other. We are rather weak at mathematics and physics, luckily we don't need much, just ...
0
votes
0answers
173 views

How to add colision for a punching in Unreal engine 4?

I imported a skeletal mesh as a player character and now imported a punch animation and made a blueprint that plays the punch animation when leftmousebutton is pressed. So now how to add collision to ...
2
votes
2answers
560 views

Frame-rate independent friction on movement in 2d game

I have been trying to implement a simple physics system for a 2D space game I am making. I have it pretty much working, but I have encountered an issue with the way I apply friction. I have tried ...
0
votes
2answers
562 views

Can I have a fixed-angle sprite with a non-fixed-angle CircleCollider2D?

In Unity2D, can I have a fixed-angle sprite with a non-fixed-angle CircleCollider2D? I would like to move my character using the circle physics (without fixed-angle), but display him always as if he ...
0
votes
0answers
49 views

NavMesh giving jerky like motion

I instantiate Gameobjects that have a NavMeshAgent attached to them. Their destination is the player that can move around a map, and there is a baked NavMesh on the map. The problem I'm having is ...
2
votes
1answer
137 views

Is restitution the wrong value, to make bouncing objects?

I have been experimenting with Bullet. Specifically I was modifying the Hello World tutorial, to make the ball bouncing. The first thing I noticed is, that I need to set both the restitution of the ...
1
vote
1answer
56 views

How to get the directional vector (for IrrKlang) from pitch and yaw?

Currently my game engine allows the player/camera to pitch and yaw, so there's no roll. The pitch angle starts at 0°, which means the camera is facing straight ahead. From here it can go up to +85° ...
1
vote
0answers
75 views

Unity 5 Distributed Physics in Client Server Model

I have a server which controls a physics object via buttons, adding force whenever I click them. I want to be able to have a client connect and whenever the physics object has a reaction on the ...
0
votes
0answers
55 views

Unity Mechanim makes physics behave weirdly

I'm developing a 2D Wrestling game in Unity 5 build 5.1.2f1. It's just the beginning so the character only has a number of animation states and a rigidbody2d. This is the state machine and these are ...
1
vote
1answer
107 views

How can I implement child objects that follow the movement of a parent?

I'm looking for a way to have a character, let's call it "root," with a number of other similar characters attached to it. Let's call them children. When the root changes position the children follow ...
6
votes
3answers
3k views

Car (or other “object”) acceleration and braking: how to?

I'm not good in math so I'm here to ask you how to manage, in a simple 2d game, the car acceleration and braking. I'm trying to develop it (as a hobby) in c# and sdl.net.