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

Game Sprite Motion

I really like the effect that I see in this video of Mario Party 10 Jewel Drop (at 2:40). It occurs when the four green orbs join together. You'll see a four items with long trails move to the top ...
-4
votes
0answers
23 views

How do i like record a video in my phone and play while its filming thx

Ive tried like recording then pressing home button and playing games and when im done it does not work
2
votes
2answers
85 views

why is my enemy AI is on air while moving?

In Unity3D I have created an enemy AI and applied a script for it to move and chase the player. But when moving, the enemy hovers in the air. My character also does not have rigidbody and he just has ...
1
vote
3answers
46 views

Need help with physics 2D Unity

I'm making a 2D game in Unity. Basically there's just a rocket that goes where ever the user touches. With the code that i have right now, the rocket instantly rotates towards the point and moves ...
1
vote
2answers
52 views

Preventing a Combination of Rigidbody Jump Force & Bounce Magnitude in Unity3D

I'm building a fairly simple marble racing game in Unity3D. The ball is a 3D physics object that moves only on the X and Y axes. It has the ability to roll left and right, and to jump. Pretty basic ...
0
votes
1answer
76 views

Need help with Physics

I'm using Unity to develop a game. Basically i want the player/rocket to follow a point on the screen where user touches. But It's based on physics. Force must be added when user touches somewhere and ...
2
votes
1answer
66 views

How does matrix based game physics (collision detection & response) work?

I'm familiar with how to do collision detection and response using shape intersection tests, the separating axis theorem, and by using MPR and GJK with minkowski sums and support vector defined ...
1
vote
1answer
56 views

Sliding DOOM style collision resolution against arbitrary 2D geometry

I've been working on a HTML5 canvas raycasting engine for the web browser, with the end goal of making a simple FPS game in the style of the early 90s. The engine sits somewhere between Wolfenstein 3D ...
0
votes
1answer
18 views

Kinematic equations script fail

I added the kinematic equations to my code and now none of it works. I get the error rigidbody.torque assign attempt for 'Enemy' is not valid. Input torque is { 0.000000, NaN, 0.000000 }. ...
0
votes
1answer
51 views

Move Ball to clicked direction

I have a ball as a sphere in my game and Im viewing it from top down view (birdseye). The ball is a rigid body. I want to achieve when I click somewhere on the screen, that the ball moves toward ...
0
votes
0answers
15 views

Precision problem when doing collision detection?

I've got this problem, and I don't know what may be the cause of it. I finished reading this article on sphere-triangle collision. My character (the sphere) stops before it reaches the triangle, and ...
2
votes
1answer
28 views

Why is the drag force multiplied by the inverse normalised velocity vector?

In pure physics texbooks, I'm seeing this formula to calculate fluid drag force: It is clearly stated that it should be opposite to the velocity. Now to me that means, in pseudocode: fd = ...
1
vote
1answer
36 views

Objects phasing through each other in physics engine

I'm writing my own physics engine right now (following this tutorial), but I'm running into some problems. Sometimes on collision, objects will just phase through each other instead of bouncing off of ...
-1
votes
1answer
36 views

How do i move a 2D object with angle and speed variables in unity?

I want to move an object with a certain angle and speed, is there a was to set this as an initial velocity so that it is still possible for the object to collide and bounce of other objects using its ...
1
vote
0answers
49 views

Why doesn't my orbit form an ellipse?

I'm playing around and trying to build an orbit simulator. Unfortunately, it isn't working out to well. Instead of forming some sort of elliptical orbit, I get this: Here is the code I'm using to ...
4
votes
2answers
137 views

How do I separate physics from framerate?

Skyrim (Creation Engine / Gamebryo) is a prime example of a game that has its physics tied to the framerate for which it has been heavily criticized, because if you disable vsync / have a > 60 HZ ...
1
vote
1answer
65 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
2answers
43 views

Using fixed timestep and interpolating states makes physics fall behind one frame. Does that affect responsiveness?

The title says it all, but let me build more into the question: I suppose everyone by now knows the Fix Your Timestep article, and its proposal to free your physics engine steps from your rendering ...
-1
votes
2answers
60 views

How to get a pleasant path accelerating to a point

I am having trouble moving an object to a target position with a maximum acceleration limit. If i just accelerate towards the target the object will fly in a doughnut a few times before hitting the ...
0
votes
1answer
7 views

Is GetFixtureA() of b2Contact guaranteed to return the body on which GetContactList() was called?

For example, in the code below, will the assert ever fail? for (const b2ContactEdge *contactEdge = playerPhysicsBody->GetContactList(); contactEdge; contactEdge = contactEdge->next) { ...
1
vote
1answer
50 views

How can I determine “exact moment” of collision with ray casting?

I'm currently brainstorming how the physics for my game engine is going to be handled. It's top down and I'm thinking of using ray casting for collision detection. I've reached two potential problems ...
2
votes
1answer
61 views

Organizing movement, collision detection, and collision resolution

There's many articles on the internet focusing on how to implement movement, collision detection, or collision resolution. What I'm wondering is how to put them together, specifically in what order to ...
-1
votes
1answer
42 views

Applying velocity to objects in a specified direction

How to apply velocity to a particular direction? Data which I have: object position (P1) destination (P2)
0
votes
0answers
17 views

Static blocks - phaser isometric plugin

I'm creating isometric game like minecraft with phaser engine with rotates isometric plugin and I need colliding with player, but when I turn off physics, blocks is not static. Question: How to ...
2
votes
1answer
76 views

Change in direction should slow down object and accelerate in new heading

I'm trying to implement some sort of faux space physics in my 2D game. I have a top down view of my space ship. You can change direction and set a speed up to a maximum which then accelerates the ship ...
-1
votes
1answer
106 views

Using Physics.Raycast inside OnCollisionEnter2D function

void OnCollisionEnter2D(Collision2D collision) { foreach(ContactPoint2D contact in collision.contacts) { RaycastHit raycastInfo; ...
1
vote
1answer
39 views

Using Farseer Physics, how can I get objects to bounce at the correct angle

I am using the Farseer Physics engine in my MonoGame project. I have static walls which have "body" friction 0 and "body" restitution 1. I have dynamic objects, which are circles, with "body" friction ...
1
vote
1answer
47 views

How to detect collision position and that position's texture color in Unity?

I have a prefab and I use Circlecollider2D for physics operations. I want to detect the color of the contact position of the collided objects ? Is is possible by using Unity's collider classes ?
4
votes
1answer
104 views

Rotate a rigid body not around its centre of mass

I have a rigid body (a boat) whose centre of mass is towards the front of the object. However, this makes the rotation look strange as the rudder that is turning the object is at the back of the boat ...
4
votes
0answers
129 views

Circle Collision Resolution and Angular Momentum

I have a 2D engine working pretty well that involves rectangles and circles. I just reworked parts of the collision detection/response system for better handling of angular speed/momentum. The ...
1
vote
1answer
48 views

LOVE Physics - Joint Stretching

After asking a similar question yesterday I've come across another problem with using joints in box2D / LOVE and trying to create a weighted chain. Everything is set up as follows, I've tried to ...
0
votes
0answers
39 views

How to get plausible platformer physics with Farseer on MonoGame/XNA?

I am creating a 2D Vectorial (made of polygons, not tiles !) platformer using MonoGame and Farseer Physics Engine. Everything works perfectly, except the movement of the character which doesn't feels ...
1
vote
1answer
61 views

LOVE Physics - Breaking Joint Chains (LUA / Box2D)

Wasn't sure whether to post here or on SO so please move if needed. I've been having a look into the box2D physics API provided by LOVE to try and create a swinging flail or weighted rope but I'm ...
1
vote
0answers
32 views

Implement car handling in Phaser [closed]

I'm experimenting on implementing a GTA 2 like game with Phaser. I started using Arcade physics but since the body boxes do not rotate the collision detection was very poor. In order to have better ...
0
votes
0answers
28 views

Which Box2D-like physics engine parameters need pixel conversion?

The official guide does not have any useful details on the matter: http://www.box2d.org/manual.html Position is an obvious one. What about velocity? Density? Anything else? Update: the context is ...
3
votes
1answer
68 views

Box2d Body to follow mouse movement

I am trying a box2d body to rotate following the mouse. Here's an image to clarify what I mean. The red and blue circles are current point of the mouse and the body (of corresponding color) ...
1
vote
2answers
434 views

Testing Unity 2D Physics

I am looking to push the 2D physics in Unity to the extent where when so much is going on that there becomes noticeable lag in a game. This is for testing purposes, so that when so much is going on ...
1
vote
2answers
236 views

How can I calculate the future position of my moving object?

I'm relatively new to games development and I have a 2D game where the playing area is an enclosed rectangle with width w and infinite height. In the playing area there is a ball. A gravity force of ...
4
votes
1answer
206 views

2D Collision response - rotating, moving polygon hitting a wall

I'm trying to bounce a polygon that has both velocity and angular velocity off a (immovable) wall when one of the vertices collides with it. I can detect the collision, and I've worked out how to ...
4
votes
1answer
133 views

Half top-down view collision and mechanics

I'd like to create a game with a half top-down (2d RPG) view (I don't know the exact name of it). It would be 2d, but I'd like to add 3d-like collisions. For example: If the grenade lands on the ...
6
votes
2answers
149 views

Pathfinding with inertia

I'm currently working for pathfinding for a game where units are moving, but they have inertia. Most typical pathfinding algorithms (A*, Djikastra, etc.) are simply designed to minimize the length of ...
3
votes
2answers
87 views

How do I integrate drag over distance?

In my game I want to model kind-of-accurate bullet physics. I have the following drag equation (in C#): float drag = 0.235f * density * velocity*velocity * Mathf.PI * sizeMM*sizeMM/4000000; In ...
2
votes
1answer
39 views

Is it dramatically more efficient to have less BoxCollider2D's (for raycasting/custom physics)?

I have a temporary tile system for my platformer where I simply duplicate the same tiny box sprite with a BoxCollider2Don it over and over again. Like I said this is a temporary procedure for design ...
0
votes
3answers
92 views

How to change the gravity with a click

How to change the gravity of a ball upward with a click Then change it again downward with another click And so on In unity
2
votes
1answer
84 views

How to rotate an object along its trajectory path?

I have a missile launcher that uses initial velocity for the trajectory. I edit the launch angle from the editor, and then the script calculates the initial velocity required to land the missile to ...
1
vote
1answer
34 views

How to move sprite mimicking mouse/touch position on some part of the screen?

I am having a difficulty and I am been doing it wrong, I think. I want to move sprite relatively to touch. Just like when you are playing space shooter like 1943. I just learning some math and try to ...
0
votes
1answer
49 views

Controlling the movement of player by sprite using Mouse

I want to move the player by pressing down on the mouse and moving around by dragging. The player won't move to the position of the mouse. Instead it should be relative to the players current ...
0
votes
1answer
29 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
145 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 ...
1
vote
0answers
25 views

Sizing a Box2D ground object

I am developing a platformer game using SDL2 for graphics and Box2D for physics. I am currently designing my levels and would like to know if it is better to make the static part of each level (ie: ...