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

Can I use physics in Isometric map based games?

I am trying to use physics in my game which is an isometric map based sterategic games that the gamer deals with a city full of buildings, roads and people in it. I am writing the game with Swift ...
4
votes
1answer
41 views

How do I prevent raycast car wheels sliding sideways?

I've been writing a non-realistic car physics engine as a learning exercise, using this article as a reference. I have a car that correctly collides with a terrain and applies the correct suspension ...
2
votes
1answer
39 views

Getting the Volume of an Uneven Mesh

Let's say I have a cube, and that cube breaks apart into 100 different unevenly sized pieces. How can I get the volume of each of those pieces compared to the cube's volume? Using this in order to ...
4
votes
1answer
59 views

Predictive Collision Detection - Find Time Of Impact

I have a green box at a starting position A. It can move along two paths A to B is linear motion A to C is under the influence of gravity (non-linear) The thin vertical line is a fixed ...
0
votes
1answer
79 views

How does orbital math work?

I'm writing a 2d space game, and I want the players to be able to 'orbit' objects and other players (if they're fast enough, of course), but I'm having trouble coming up with the right way to think ...
5
votes
2answers
200 views

How to create rope?

I'd like to re-create this game, but I have no idea how to create the rope, or its influences on the ball. Basically, there is a rope, "attached", at one end, to the mouse pointer, and at the other ...
1
vote
1answer
64 views

Find alternate shortest paths in Unity

I'm developing a game in Unity. It's a simple game where the rocket has to reach the point where the player touches on the screen. The movement of the rocket is physics based. When the rocket goes off ...
1
vote
1answer
50 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; ...
5
votes
0answers
81 views

Orbits: Combine the Pros of RK4, Symplectic Euler, and Verlet Velocity Integrator

Recently, I've implemented and compared a number of basic integrators for my physics engine. The 3 that gave me the best results are RK4, Symplectic Euler, and Verlet Velocity, but I think I need ...
0
votes
1answer
31 views

Unity 5 Server Side Physics - Alternative to constant position update?

I am looking into reducing load in client server games for a uni project and am looking at physics. The idea is that if a very low powered device tries to carry out some physics heavy action that it ...
0
votes
1answer
38 views

Invalid AABB aabb

Invalid AABB aabb UnityEditorInternal.InternalEditorUtility:CalculateSelectionBounds(Boolean, Boolean) I've got this error when I place any convex mesh collider in scene. What does it mean? Game ...
2
votes
0answers
72 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 ...
1
vote
3answers
101 views

How to build a spaceship with interior in unity?

I've begun to study a unity engine in one purpose: I have a great multi player game idea! The main essence: In space there are two (or even more) huge spaceships with crew consisted of players (all ...
0
votes
2answers
67 views

Player in Spaceship

I want to realize space game on Unity3d engine. There are some huge spaceships in the void. So, I want players flying in space in weightlessness, but when they go inside any spaceship, they will be ...
1
vote
1answer
80 views

How to implement angled surface?

I'am trying to implement 2D platformer game inspired by N game. But the problem is I have no idea how to implement something like this: I have two ideas of how this could be implemented but i ...
4
votes
1answer
208 views

How To Program a fully controllable spring (Damped) motion

i'm working on a project that needs realistic 2D Animation, none linear motion you might say, i have tried many things such as Hermite Curve and a few other motions and in the end Spring Motion. ...
1
vote
1answer
52 views

Box2d jetski on water

At the moment I am trying to code a 2d game in java, where a jetski is riding on water. If you press on the screen the jetski should dive down and jump back up on release. How do I have to do this in ...
0
votes
0answers
27 views

Gravity and Jumping in Clickteam Fusion 2.5

So I'm currently building a bare-bones functioning game that involves simple platforming. Quite literally a box moving left and right and jumping. I'm using Clickteam Fusion 2.5, and I know there's an ...
0
votes
0answers
16 views

AABB in OpenCL not working correctly

I have this really simple OpenCL kernel. The values get in correctly and get out correctly. So the error must be somewhere in the kernel. All the parameters are float arrays. pos rot vel and aPos aRot ...
0
votes
0answers
20 views

How velocity impacts on CCSprite in Cocos2d Chipmunk?

I am in need of the basic understanding of how velocity changing works? i.e. how CCSprite is able to jump at particular height when some velocity is set? Let me give you an example on which I am ...
0
votes
1answer
15 views

PhysiJS and objects on top of moving objects

Using Physijs which uses ammo.js. I am attempting to simply place a sphere on top of a box, the box is moving back and forth and I want the sphere to move with it while also being able to move on top ...
0
votes
3answers
61 views

2D Physics friction on a moving platform?

I have a few basic platforming mechanics going on in this scene. I have a prefab platform with an animation that loops back and forth between two different x positions, but does not begin looping ...
2
votes
1answer
39 views

Why are my Hello World Box2D project's collisions off by twice the size of my boxes?

I've been implementing Box2D into my engine but have run into a snag. I decided to rebuild the helloworld project inside of my own engine (it is almost identical), of which I will snip here in a ...
0
votes
1answer
60 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 ...
2
votes
2answers
99 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
59 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
85 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
80 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
77 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
66 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
31 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
52 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
17 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
33 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
38 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
41 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
53 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
162 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
83 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
48 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
62 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
57 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
65 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
47 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
22 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
2answers
105 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
109 views

Using Physics.Raycast inside OnCollisionEnter2D function

void OnCollisionEnter2D(Collision2D collision) { foreach(ContactPoint2D contact in collision.contacts) { RaycastHit raycastInfo; ...
1
vote
1answer
51 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
53 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 ?