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

Issue with detecting collisions in Pong

I've been working on making Pong in OpenGL and SDL and currently have both paddles and the game ball set up properly. I have an Object (or Entity) class which is used to instantiate each of the ...
3
votes
1answer
108 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 ...
1
vote
1answer
311 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
67 views

How can I handle multiple force in Unity?

I'm trying to get my character to perform a "dash" where their x velocity increases rapidly and then falls over time. However, I'm also maintaining a constant x velocity so the character appears to be ...
1
vote
1answer
79 views

Dropping through a platform in Clickteam Fusion 2.5

I am using Clickteam Multimedia Fusion 2.5. Currently, I have a rudimentary platformer game, with the following setup: player object is set as a physics platform, with the physics engine added to ...
3
votes
0answers
41 views

Rotation of a ball moving on a surface

I have a ball that moves along a platform. The ball is characterized as a sphere that has a radius and a position. The platform basically is a rectangle consisting of two vertex triangles. Its class ...
0
votes
1answer
44 views

How to move 2D objects based on mouse movement with pointer locking?

I'm using pointer locking for a 2D game (where you perform calculations based on the delta in mouse positions from frame to frame). I'm having some basic math/logic issues with accomplishing what I ...
1
vote
1answer
25 views

Stuck on walls or sliding on top dilemma

I'm making a 2.5D platformer game. I earlier had problem with my character getting stuck on walls when holding the forward button. I solved this problem by adding a physics material with zero friction ...
1
vote
3answers
77 views

Calculating the angular momentum of rigidbody in Unity3D

Knowing that angular momentum in 3D is L = Iω (moment of inertia times angular velocity), how do I calculate it in video game world? In unity3d I have the diagonal inertia tensor rigidbody....
1
vote
1answer
92 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
0answers
31 views

Why can I see through 3D assets? [on hold]

This is the case in most 3d games, and I can't figure out why. Ideally I could mitigate this (as it is not the best play experience) but if not, I would at least like to understand the mechanics of it....
1
vote
1answer
548 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 ...
3
votes
2answers
614 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 ...
2
votes
3answers
131 views

Keep gravity velocity the same all the time

I have 2D rigidbodies that fall to the ground, however they speed up while falling. Also, when they freeze in the air and then unfreeze, the velocity is set to 0 and they gradually start speeding up ...
0
votes
0answers
21 views

What's the best book to give you the math and physics background to make your own game engine? [closed]

I want to make my own game engine, but could use a refresher on math and physics. I already know some stuff (like how to multiply matrices, integrals, differential calculus etc.). I've narrowed my ...
1
vote
3answers
413 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 * ...
1
vote
1answer
41 views

Unity using Animation and Ragdoll

The question is simple, but I can't resolve it for a couple of days. I have an enemy model with ragdoll attached and also a couple of animations(e.g. idle, walk, run). It seems that ragdoll work only ...
1
vote
0answers
11 views

Serious issues with grid of connected springs

So i have a simulation I am trying to make where there is a grid. Each dot will be connected to the dot Above, below, left, or right (If such dot exists) via a logical grid. Theoretically when I ...
0
votes
0answers
27 views

p2 collision not working after state change

i have 2 objects GAME.ball Game.stick both have two bodies and i have two scene first scene GAME.ball = game.add.sprite(x,y,key) game.physics.p2.enable(GAME.ball, true); GAME.ball.body.dynamic = ...
1
vote
0answers
14 views

In PhaserJS, how do I get a clicked Physics.P2 body's data?

I have a sprite with Phaser.Physics.P2 enabled, using a custom shape loaded with loadPolygon() from a .json file. I have also activated its debug and debugBody properties, so I can see the custom ...
1
vote
2answers
61 views

Collider not working

I have a 2D object (without a parent) with a 2d box collider (dimensions are not small) added to it and set as trigger when I place it in the scene it works just fine however when I instantiate its ...
1
vote
2answers
24 views

What is a good practice for deciding when to use transforms instead of applying force?

I was making several games. I don't understand when I should use addTorque instead of rotate. AddForce instead of position The latest game was a pinball game. I wasn't sure the best way to active ...
0
votes
1answer
95 views

Libgdx Fine Tune Megaman Movement

With help from my last question, I was able to fix the issue of having a stuttering effect if you keep hitting jump, while jumping. I believe I have managed to match moving on the X axis and the ...
1
vote
0answers
18 views

Solving constraints/joints in 1D

For n points moving in 1 dimension. Position and velocity are known for each point. Each frame a basic integration is done for each point: velocity += forces * timestep; forces = 0; position += ...
0
votes
1answer
40 views

Creating 3D gravity in zero-G tied to mass in unity with c#

As a total beginner, I've been working on a patch-job script for a gravity mechanic in an open space sim, I want to derive all my objects from this "Block ALPHA" object and its' set of variable ...
1
vote
0answers
40 views

When to Use Spatial Hashing vs Bounding Volume Hierarchy?

I've been slowly working on implementing a spatial hashing function into Bullet Physics to see how well it will work in my game engine as a general use. Though as I'm starting to design it, I do ...
1
vote
4answers
192 views

Lunar Lander calculating gravity, acceleration and collision in GameMaker

I've already asked this on the GameMaker forums but had no response so far. I'm making a little Lunar Lander game as my first foray in to GameMaker, I'm wanting to have the ship land and take off ...
1
vote
1answer
25 views

How to distinguish between full/partially intersecting Collider2D?

I'm using Unity 5 to make 2D game. I have a screen (gray), arena (green) and player-controlled object (yellow) that can be moved across the screen with mouse before placement: There is no ...
1
vote
1answer
442 views

XNA (BEPU) Physics Performance

Im using XNA 4.0 with the BEPU physics engine v1.2 and I have encountered some performance problems on Xbox. Im not sure if the my mesurements are an expected result of the Xbox (with alot of dynamic ...
1
vote
1answer
47 views

Unity rope/cable physics / anchor points

I'm creating a cable in Unity, which should behave realistically. I found 2 different ways to approach the problem. First was to simply rigg a subdivided cylinder in Blender, Cinema4D or whatever ...
1
vote
1answer
709 views

Swinging a sword in Xcode with Sprite Kit

I'm working on making an RPG in Xcode, and I'm having a major gameplay issue when it comes to having my character swing his sword in a way that is realistic and gameplay compatible. Right now, when ...
0
votes
1answer
404 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 ...
0
votes
1answer
235 views

Moving CCNode with constant speed in cocos2d

I want to move the object (CCNODE) with constant speed in any direction , what i have did till now is applied a force to object at start to get it moving and set elasticity as 1 and friction as 0 to ...
0
votes
1answer
34 views

How to find starting velocity for a body thrown by an angle when known distance it must pass?

From course of mechanic, we know, that to find distance, passed by a body thrown by an angle, we need to use that formula: Sy(t) = V0 * sin(angle) * t - (gtt) / 2; Sx(t) = V0 * cos(angle) * t; My ...
0
votes
1answer
24 views

Handling movement on sloped surfaces - clamping character to sloped surface

I've noticed that a lot of people seem to have this issue but I've yet to find an actual working solution - when a rigidbody-based character controller (I'm not using Unity's character controller) ...
0
votes
0answers
9 views

Object freezes in the air when using Panda3d collisions

I'm trying to make a simple box fall to the ground in panda3d (1.10) This is the code I have so far: from direct.showbase.ShowBase import ShowBase from panda3d.core import * from panda3d.physics ...
4
votes
2answers
302 views

How to impale and stack targets correctly according to the collider and its coordinate?

I'm making another simple game, a catch game, where a spawning target game object must be captured using a skewer to impale it. Here how: At the start, the falling object (in red) will fall in a ...
3
votes
2answers
416 views

Sprite Kit - containsPoint for SKPhysicsBody?

I have a ball bouncing around the screen. I can pick it up and drag it onto a "bucket". When my touches finish, I use the containsPoint function to check and see if I have dropped the ball onto the ...
0
votes
1answer
46 views

BulletPhysics ship rotation

First of all, I'm a beginner in game physics, and I think this is a relatively easy problem that I'm not grasping. Short Version: I have a box(representing a ship on water) going forward with a ...
-4
votes
0answers
29 views
35
votes
5answers
8k views

How can I give the illusion of height to a ball in 2D?

In 2D top down soccer games, sometimes a ball is given the illusion of being in the air, like below: How can I achieve this?
1
vote
1answer
584 views

How to move rigidbody player to its facing direction with AddForce?

How can I move a rigidbody to its facing direction? I've already tried this: rigidbody.AddForce (transform.forward * v, ForceMode.Acceleration); // v is a public float which gets a new value in ...
2
votes
1answer
105 views

2D Change Velocity Based on Distance XY While Moving Parabolic Arc

What I'm trying to achieve is that the entity moves in a parabolic curve, and no this has nothing to do with gravity before you ask. I give the entity a target position which it should move to, but ...
1
vote
2answers
700 views

Use both AddForceAtPoint and change velocity property?

I'm using Rigidbody2D for some game objects. It seems that when I AddForce() or AddForceAtPoint(), the game objects are mostly affected on the Y axis and hardly at all on the x axis. I don't ...
0
votes
2answers
637 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 bMap[100][100][...
0
votes
1answer
230 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 ...
6
votes
1answer
369 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 ...
2
votes
1answer
131 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 ...
1
vote
1answer
16 views

Bullet Physics Applying Torques Effects not noticeable

I am applying torques to a rag doll in order to make it move/walk. For some reason, I am unable to view any effects when I use a call to rigidbody to apply torques even though these torques are ...
2
votes
2answers
186 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 ...