Questions tagged [physics-engine]

Software for simulating physics like collisions, forces, mass, joints, motion etc. Examples of physics engines are PhysX, Havok, Bullet and ODE.

Filter by
Sorted by
Tagged with
19
votes
1answer
28k views

What are some known 2D/3D physics engines for XNA? [closed]

I'm looking for a physics engine to use in an XNA project (2D or 3D). Because it's for XNA, it needs to fulfill some requirements: Not necessarily free, but close to it is obviously preferred Managed ...
0
votes
0answers
10 views

ArticulationBody Stability Stopgap

I have an ArticulationBody with a relatively large number of joints that interacts via capsule colliders with a static mesh collider. This works pretty well under most conditions, using continuous ...
3
votes
1answer
1k views

Cutting a body in box2d

After cocos2d, I'm looking at box2d... And I have some questions: I was wondering how to cut a body into pieces. How do I determine the intersection point of the body with the cut line? Create a new ...
13
votes
1answer
728 views

In games physics engines, what is “tunneling”, also known as the “bullet through paper problem”?

I have recently had an issue where sometimes a collision would not be detected. Someone told me that maybe I had an tunneling issue. In the context of game development using physics, what is tunneling?...
3
votes
1answer
825 views

Friction due to gravity in an impulse based physics engine

In my physics engine, I'm using impulses to solve collisions. I'm basing all calculations on these equations: ...
1
vote
0answers
33 views

How to avoid CollisionShape2D bouncing which prevents Area2D detection?

Consider the player with a rectangular CollisionShape2D: and a round enemy with a CollisionShape2D and a little bigger ...
1
vote
1answer
67 views

Difference between _process(delta) and _physics_process(delta)?

The documentation is pointing one main difference, this is the concept of being synced or not with the physics engine, so the delta parameter has more chance to be ...
0
votes
1answer
27 views

Predict future position of a moving body in Phaser arcade physics

I am looking for an equation for predicting the future position of a moving arcade physics body in Phaser 3. The body has drag applied and isDamping set to true. Phaser applies the drag using the ...
0
votes
0answers
36 views

What is causing my wheel collider's raycast to fail?

I'm making custom car suspension(Custom wheelcollider etc), now I encountered a problem where if car gets dropped from a certain height, raycast will fail to detect collision and wheels intersect with ...
0
votes
1answer
404 views

Physics engine and rigidbody sleep optimization

I am trying to add sleep optimization to my little physics engine(just for learning). I use SAT for collision detection that returns penetration normal and depth without contact points. Objects are ...
2
votes
1answer
25 views

How do I calculate impulse when an object collides with plane(fixed object)?

I've been developing simple 3D impulse-based physics engine. I calculate impulse as follows: $$j_r = \frac{-1(1+e)v_r\cdot\hat n} {m_1^{-1}+\bbox[yellow,5px,border:2px solid red]{m_2^{-1}}+(I_1^{-1}(...
1
vote
2answers
849 views

How to get the point of collision in Separating Axis Theorem?

I'm interested in the relatively precise point (not line) of collision for calculating angular velocity on impact for use in a impulse calculation. At first I thought, perhaps naively, that I could ...
2
votes
1answer
313 views

Calculating real time moment of inertia around arbitrary axis in 3d

I have a 3d rigid body consisting of multiple triangles forming a closed mesh. I know how to calculate the moment of inertia around an arbitrary axis by splitting up the mesh into simpler shapes and ...
0
votes
0answers
21 views

Calculating the bouncing ball bounce height while on platforms

I tried to calculate the bounce height for the bouncing ball however it ends up shaking against the moving platform after it finishes bouncing. grav_val in this ...
14
votes
5answers
5k views

Why integrate over accumulation?

I'm starting to learn how to DIY physics, and I have a question about implementing integration at the most basic level (i.e. this is not a Euler vs. RK4 question). Nearly every example I come across ...
3
votes
1answer
480 views

Rigid body falls through static mesh even though collision is detected

I'm using Jitter Physics to create a game. For testing, I have ball (a spherical rigid body) falling onto a small box-like mesh. The problem is that the ball falls straight through the floor, even ...
1
vote
1answer
732 views

How would joints work in an impulse-based physics engine?

I want to learn about physics engines, especially impulse-based ones. So I've followed along this tutorial to create some simple rigid-body physics: http://gamedevelopment.tutsplus.com/tutorials/how-...
2
votes
1answer
49 views

Scaling physics engines beyond single computational server

Currently working on a small home project of developing our own game. The game basics are just a straightforward space game, currently without any collision detection/resolution, just movement with ...
4
votes
2answers
3k views

What are the disadvantages of R-Trees in collision detection?

I was poking around in SQLite and discovered R-trees. A little digging revealed that R-trees are really just fancy AABB-trees. Then I realize that the state of the art in collision detection (often ...
1
vote
0answers
31 views

What is closing and separating velocity in Ian Millington's game physics book?

I'm working on a physics engine in C++ and chose Ian Millington's Physics Engine Development book as a guide and reference to help me out understand physics concepts and how to implement them. ...
1
vote
1answer
58 views

Simulation step size in a physics engine

I am trying to integrate a physics engine (Bullet) into my game engine, but I immediately found that I do not know how big should I make the simulation step. I think of 2 options: Use a fixed step ...
0
votes
0answers
35 views

Snooker/Pool AI Predicting end location of cue ball Unity

I’m trying to implement a pool/snooker game. I figured the best way to implement the ball movement/potting mechanics is to use the physics simulation, apply an impulse to strike the cue ball and let ...
1
vote
1answer
47 views

Is an inertia tensor in local-space always diagonal?

I'm looking at the implementation of a physics engine and I observe that the inertia tensor of a rigid body, in local-space coordinates, is stored as a 3 dimensional vector, rather than a 3x3 matrix, ...
0
votes
2answers
124 views

What's the maths behind checking line of sight

I understand in unity there is Phsyics.LineCast(Vector A, VectorB). What's the maths behind doing that, the only thing i can think of is going along the line at small intervals and seeing whether it ...
0
votes
0answers
47 views

Are you supposed to be looping through all PhysicsObjects at every step in a physics engine?

I am currently making a small 2D game and I am trying to implement some basic 2D physics. I currently have a list of around 100 PhysicsObjects which I loop through every frame in order to update and ...
0
votes
1answer
198 views

Creating Complex Collision Shapes in GMS2

I'm pretty new to Game Maker Studio 2 and I've hit a wall in programming with their built-in physics engine. I created a irregularly shaped object and I want to modify the collision shape so that it ...
0
votes
0answers
34 views

LibGDX program crashing on on StepSimulation call

I am trying to add a Character Controller to a Discrete Dynamics World in Bullet via the LibGDX wrapper and everything seems to work, but when I attempt to update the world via the StepSimulation ...
0
votes
0answers
14 views

Problem using a CharacterController with a moving platform

My game has a wierd problem that I can reduce to the following minimal working example. There is a box object with a component with the following method: ...
1
vote
0answers
42 views

What in the BOTW game engine makes physics behave wildly when certain actions are triggered during bullet-time? [closed]

What in the BOTW game engine makes physics behave wildly when certain actions are triggered during bullet-time? https://www.youtube.com/watch?v=dXKsTrwZ6XY Also, what can you do to prevent it? Is this ...
0
votes
0answers
51 views

Retractable object in unity

I'm trying to get the physics of a retractable object in unity, So I will be able to "launch" an elastic cable (similar to rope physics) out of an object (e.g. A gun), And the cable will ...
0
votes
0answers
39 views

Collision response using the Minimum Translation Vector

I am trying to use the Minimum Translation Vector (MTV) returned from the SAT algorithm for simple collision response. Please see the example below. By separating the colliding boxes by moving the ...
1
vote
0answers
46 views

Proper sphere collision resolution?

I am implementing a sphere to sphere collision resolution and I am a little confused on where to start. First question, is there a standard way that games/engines do sphere to sphere collision ...
0
votes
0answers
41 views

How to implement joints in and impulse based engine

I have been writing a 2D physics engine (for fun and learning) for a while now. I have managed to implement collision detection along with collisions responses with angular impulse and frictional ...
0
votes
0answers
28 views

Calculating radius during collision

This picture is from one of Dirk Gregorius' presentations: The original diagram has only one contact point (the red one). The r_1 and r_2 vectors are required to produce rotation while solving the ...
0
votes
0answers
47 views

Contact points in collision

I am making a GJK-EPA based collision detection routine. In this picture, the algorithm picks up on two contact points (the endpoints of the green penetration vector). I'm certain that the penetration ...
0
votes
2answers
87 views

How to switch career to game engine/graphics programming [closed]

My whole background is related to enterprise applications but I've been thinking of switching my career path from enterprise/business to something that I feel is more challenging and interesting. One ...
0
votes
0answers
243 views

(Unity) how to write my own raycasting functions

I am making a game in curved space in Unity and I am trying to figure out the best way to handle raycasting. For my purposes the Ray struct doesn't carry enough ...
0
votes
0answers
23 views

How to make particle based fluid simulator like Algodoo?

I need to create swim mechanism which is interaction between object actuator and water. I've play Algodoo and I can make simple swiming mechine. Which priciple to achieve this? As far as I know it ...
0
votes
0answers
20 views

How do I calculate forces from a cinematic rigidbody?

Imagine a game with an astronaut that is directly controlled by a players pose. If the player now rotates their arm from the waist to the head, a rotation of the whole body in the opposite direction ...
0
votes
0answers
24 views

Trying to create a knockback effect between 2 squares (Code in Java)

I've been in trouble for weeks now and I don't understand why it doesn't work for me! I have tried so many things and I just can not understand. I try to get one player to get a knockback as soon as ...
0
votes
1answer
68 views

Unity data sampling rate

I'm using the Unity as a physic simulation and I want to gather the data of object position from it. So I put my code about random the force and apply to that object. Also the part that Write the data ...
2
votes
2answers
371 views

How do fixed-point physics (engines) work?

I would think there should be an abundance of excellent articles answering this question, but my searches have come up completely empty. I am developing an embedded graphics engine on a ...
0
votes
0answers
30 views

Reading collision force between two bodies in a 3D physics simulation engine (ODE?)

I want to detect collision and read the collision force vector between two bodies in a 3D physics engine like ODE. Could someone please tell me how to achieve this? ...
1
vote
0answers
137 views

How to use continious collision detection in a dynamic AABB tree

I am currently writing a game in c++ using openGL, and I am currently using a kinetic sweep and prune algorithm for the broad phase and then using GJK Raycast + GJK & EPA for the narrow phase. ...
1
vote
1answer
69 views

How can I decelerate a physics object to a stand still?

I am currently working on a little prototype and I am struggling to apply a friction force to slow down the player object. I have a simple physics engine using the model of setting acceleration, ...
0
votes
0answers
39 views

Portal physics by bending space

I've been thinking about how to implement a portal, and after a quick search, everyone seems to do it by adding a camera per portal and then just update the other portal's view with that camera's view....
47
votes
6answers
12k views

How can I perform a deterministic physics simulation?

I'm creating a physics game involving rigid bodies in which players move pieces and parts to solve a puzzle/map. A hugely important aspect of the game is that when players start a simulation, it runs ...
0
votes
1answer
28 views

Having trouble with btGeometryUtil::isPointInsidePlanes

I'm in the process of parsing a BSP file to create btConvexHullShape objects for each brush. I've seen a few examples of how to do this on Github and they all use the getVerticesFromPlaneEquations ...
6
votes
3answers
9k views

Applying angular velocity to quaternion

I am reading Game Physics Engine Development by Ian Millington currently. In his book, he represent an orientation of rigid body by quaternion. I don't understand the formula where he apply angular ...
3
votes
1answer
210 views

Time complexity of solving constraints in physics engine

Erin Catto mentioned in a talk that solving constraints precisely requires cubic time and quadratic space. What algorithm is he talking about when he mentions cubic time? pdf of slides with following ...

1
2 3 4 5