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

2
votes
1answer
103 views

Twin-stick controls for a cohesive group of agents

I'm trying to implement a classic twin-stick controller for a group of physics-based game objects. Here are the rules I'm trying to follow: Agents always stay close to each other within a certain ...
2
votes
1answer
201 views

Physics: calculating angular acceleration in world vs local space

I have a pretty simple rigid body simulation written in Python. In my code I calculate the angular acceleration using formula: angAcc = torque * inertiaTensor^-1 (note row-major matrix order) Now, ...
0
votes
1answer
39 views

Use constant force to hold something in position

This may actually be more of a Physics.SE question but since im doing this in Unity I figured I'd ask here. I am playing around with the Constant Force component and have a sphere constrained with a ...
0
votes
1answer
22 views

Should a transform class store a matrix or seperate position/rotation/scale values?

I'm creating a transform class to make storing the transform of individual objects in a scene easier, but I'm unsure on how to do it. I could create one like this: class Transform { public: ...
0
votes
2answers
549 views

3D collision physics. Response when hitting wall, floor or roof

I am having problem with the most basic physic response when the player collide with static wall, floor or roof. I have a simple 3D maze, true means solid while false means air: bool ...
4
votes
4answers
300 views

Should the bullet trajectory calculated by server or by client? [duplicate]

In a FPS game like Battlefield or Arma, when playing online, should the bullet trajectory be calculated by the server or by the client?
0
votes
1answer
141 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
1answer
25 views

AS3/Flash Develop - Radial Gravity (character on planet simulation)

I am trying to create a program where a character shape will be constantly drawn towards the centre of a planet shape. I have taken on previous advice into using physics equations to generate the ...
2
votes
1answer
100 views

Add force towards a point in Unity3d?

I have a Vector2 and want to move an object towards it... (this vector2 is the mouse position when clicked and I made sure I get only one position when its clicked) My initial thought was to apply ...
2
votes
1answer
229 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 ...
1
vote
1answer
120 views

Correct way to integrate scaled axis angular velocity into a quaternion

Across my travels on the internet I have came across to ways of integrating a scaled axis angular velocity into a quaternion. The first way converts the angular velocity into an axis angle quaternion ...
3
votes
3answers
188 views

How do you apply relativistic physics to a 4x strategy game?

I had the big idea of trying to create a hard science fiction 4x strategy game (with the obvious space setting), which is supposed to simulate a realistic way of creating interstellar societies while ...
2
votes
2answers
84 views

Unity Ragdoll Colliders don't collide

I have a humanoid character with Ragdoll setup in Unity. However the box/capsule colliders on the various parts of the body don't collide with other static geometry. They do collide with the ground ...
0
votes
0answers
45 views

Implementing time step in main game loop

So ive read both http://gameprogrammingpatterns.com/game-loop.html and http://gafferongames.com/game-physics/fix-your-timestep/ and I kind of understand how I'm supposed to do it, but some parts are ...
0
votes
1answer
57 views

Unity3D - Using AddRelativeForce to push an object forever in zero gravity environment

Ok, I use AddRelativeForce to basically push an object. But it suppose to keep flying and keep accelerating as I hold down the key because I didn't set gravity. I just started Unity3D last month, so ...
8
votes
2answers
362 views

Simulation of supersonic, hypersonic flight with user defined surfaces

I want to create a small rocket-launching game, inspired by Kerbal Space Program. Since there's nothing in orbital mechanics, that I still don't know. I decided to make this as close to reality as ...
0
votes
0answers
16 views

Action Script 3 - Radial Gravity For A Planet Object In A Platformer Game And Its Class Structure [closed]

The game we are developing will be a traditional platformer game, except instead of moving from left to right to complete each level, the player must reach the centre of the circular level, or planet. ...
1
vote
1answer
160 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
3answers
62 views

Multiple Colliders in Collision

I have an object that has a front collider, left collider and right collider. When a collision occurs, I notice that there are situations where the front collider and left collider/right collider has ...
3
votes
1answer
57 views

PhysicsJS on mobile devices: how to optimize for speed

I'm (physics n00b) developing a small animation (gamification) in a mobile HTML5 app (PhysicsJS, HTML5, Cordova, Ionic, JavaScript). This animation is derived from Basket of verlet constraints. This ...
0
votes
1answer
188 views

LibGDX make an object rotate around something

I need to rotate and object, which should be a circle made up with a ShaderRender, around a specified point. In LibGDX there is a method or something which allow me to do this? If it doesn't exist how ...
1
vote
1answer
535 views

Cocos2dx+Chipmunk: Fully elastic collision between moving bodies

I'm using Cocos2dx and the built in Chipmunk physics engine, and currently I've got my PhysicsBodys' materials set up with: Density=0 Restitution=1 Friction=0 in order to get fully elastic ...
1
vote
2answers
116 views

Can I make this physics simulation any faster?

I've made a little real time physics simulation that solves some bodies. CirclevCircle && CirclevOrientedRect I would like someone to tell me if I'm doing something drastically wrong. I know ...
1
vote
1answer
45 views

Bullet Physics: Difference between Motion State and World Transform

In Bullet Physics, when I create a new btRigidBody, one of the parameters passed to the constructor is the btMotionState, which defines the initial pose of the body. However, if I then later want to ...
3
votes
3answers
231 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
177 views

Collision between a sphere and a mesh(height-map)

I am trying to implement a method that detects the collision between a sphere and a mesh and reflects the vector of speed. I have a method, that detects a collision between a sphere and a triangle and ...
0
votes
2answers
148 views

How to implement jump in a 2d game?

I am trying to implement jump in a game I have written for android using canvas. I have referred this tutorial for implementing jump. My code is like if(jumpKeyPressed){ jumpVel = ...
0
votes
1answer
37 views

Rigidbody stuck on the edge of two colliders

could You please help me with that weird bug? I've seen other people's posts about that bug, but I couldn't really understand how to fix it. As You can see, the boxes are standing right next to each ...
2
votes
2answers
405 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 ...
7
votes
1answer
103 views

In a 2D physics engine, how do I avoid useless collision resolutions when objects come to a rest?

In a physics engine I'm developing (for learning) using love-2d, I implemented collision resolutions in this way: FixedUpdate(dt) // I use fixed timestep foreach collide c1 in allNotStaticColliders ...
0
votes
2answers
40 views

How to apply force to rigid bodys at a specific point?

I am trying to write a physics engine from scratch to get a better understanding of them. It worked pretty good so far, but there is one thing, i can't get my head around: If i have a rigid body ( ...
0
votes
1answer
43 views

How to get dynamic RigidBody rotation/tilt on uneven platform?

I have a rigid body with PolygonCollider2D which has some complex circular shape and I'm using uneven platform. Im using Following code to move the object forward CharacterRigidBody.velocity = new ...
0
votes
2answers
93 views

How to make rigid body move smoothly on uneven platform?

Right now I'm using Rigidbody2d for the game character along with polygon collider 2D(2d platform game). I'm beginner hope I'm using correct components. And transform to move character from left ...
1
vote
1answer
427 views

Bullet 3D Physics Objects Not Rotating?

So I've got Bullet 3D controlling the motion of objects rendered with DirectX. In the clipping below I've got 2 identical rectangles & 5 balls. The lowest rectangle has a mass of 0 and doesn't ...
0
votes
2answers
317 views

Moving one object from one point to another with acceleration

How would someone implement moving an object from one point in 2D space to another using these formulae to update objects: m_position.setX/Y( m_position.X/Y() + m_velocity.X/Y() * dt + 0.5 * m_acc * ...
3
votes
2answers
309 views

calculating torque from angular momentum considering inertia moment

so I am trying to determine exactly how much torque to apply to a 3d model to make it rotate at a particular rate. I apply force from the location of each engine on the craft so if one breaks the ...
1
vote
1answer
160 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 ...
-1
votes
1answer
79 views

How to disable Camera from tilting when following a game object?

I have a game character object which is followed by camera. Camera is child object of Character. Using rigid body makes the character tilt in slopes and camera tilts too. how do i stop camera ...
0
votes
1answer
77 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 }. ...
5
votes
4answers
88 views

Dealing with collisions across adjacent static bodies

The Problem: I have the following setup: A, B and C are rectangular static bodies in box2d. p is a circular dynamic body in box2d. The movement of 'p' is solely controlled by the current gravity ...
4
votes
2answers
64 views

Restricting Maximum Velocity in Space

I'm making a top-down 2D space ship game in which you rotate and thrust. I'd like to impose a maximum velocity for different engine types, meaning that a certain engine can only get you going up to a ...
5
votes
2answers
113 views

How to apply friction vector to acceleration in top-down 2D game?

I'm making a top-down view 2D RPG game, meaning the player can move in any direction on a 2D plane, and I'm trying to implement a somewhat realistic non-orthogonal acceleration/friction physics model ...
0
votes
0answers
39 views

physics: formula for gradually changing force

I have two physics objects (lets call them a and b) pushing against each other and I need to determine the cumulative energy pushing them apart across a given time. Then I will divide it by each ...
1
vote
1answer
49 views

Synchronizing players and game objects in a server/client multiplyer game

OK guys, I have some experience with 2D game development (single player only), so that's fine no questions here. The problem is with multiplayer games. I already read lots of other questions and ...
4
votes
2answers
84 views

How do I set angular velocity/torque so that it's pointing to velocity/direction?

Right now, when I spawn a shootable object, it goes like this: Because I just set it's angle to this: float aimAngle = (float) Math.atan2(velocity.y, velocity.x); bullet.setBodyAngle(aimAngle); ...
0
votes
1answer
186 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
143 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 ...
1
vote
0answers
57 views

why doesn't work this example [closed]

I am new to game development. I was trying to use this http://blog.gemserk.com/2012/07/03/drawing-a-projectile-trajectory-like-angry-birds-using-libgdx/ projectile example in eclipse android using ...
2
votes
2answers
73 views

Cant jump from ground collision

I have a character that starts in the air and applying gravity to it to collide with platforms in my level. At the start, the character gradually gains speed descending until it collides with a ...
1
vote
2answers
95 views

How to stop sinking bodies in physics engine C++

I'm writing a rigid body simulation in C++, and have come across a problem when an object should come to rest on the ground. Because gravity is being applied to it's velocity, the object starts ...