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
0
votes
0answers
15 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
10 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
14 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
37 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
153 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
47 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. ...
0
votes
0answers
13 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
20 views

How to simulate an object that breaks due to falling from height?

I would like to simulate an object (e.g. an egg or a barrel) that, when it is thrown from a high position it shatters to pieces, but when it is thrown from a low position it does not shatter. One way ...
1
vote
1answer
42 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
28 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....
3
votes
1answer
176 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 ...
0
votes
0answers
15 views

Elastic collisions between cubes and walls

I have a simple scene with two cubes and walls as shown bellow. The right ball starts moving with initial instant force along the x-axis and collides with the first ball and reflect off a vertical ...
0
votes
1answer
67 views

What is wrong with my gravity calculation?

Im trying to create a method to calculate the fall time for an object using real formulas. Well I came up with this: ...
1
vote
0answers
28 views

Real-time 3D Scene-reconstruction into Physics Engine

I am trying to create a game where the user scans the room using RGBD camera and reconstructs 3D scene. This scene would be integrated into physics engine, after an object recognition algorithm tells ...
0
votes
0answers
58 views

how can I visually compensate for latency in a diep.io style game

implementing extrapolation using linear velocity, orientation and position like on here gafferongames.com/post/state_synchronization/ I'm a little confused if I want to extrapolate from a known ...
0
votes
2answers
186 views

Can I use the 2d physics engine in a 3d game (or viceversa) in Unity?

This is entirely for performance. The 2D physics are less expensive, but I require 3D for some scenes. I never need both at the same time. I know you can have 2D with an orthographic perspective in a ...
0
votes
0answers
56 views

Simulating circular motion with gravitational forces in Unity2D

I am currently messing around with a game where you control a black hole and use its gravity to fling planets at targets. I have the gravity calculations working pretty well when the planets start out ...
0
votes
0answers
45 views

RigidBody Collision Handling with Verlet Integration

Hi I'm reading the Jakobsen Paper "Advanced Character Physics" which explains how the verlet integration along with a tetrahedron (4 particles) can form a structure usable for rigidbody (with 6 length ...
0
votes
0answers
41 views

Calculating approximations of support/forces between objects in Unity

I'm looking for ways to calculate how much a given object supports another in a scene. For example, imagine a box is on a table. In this situation we may say the table provides support to the lamp (...
0
votes
0answers
26 views

Numerical errors in Player collision offset causing player to fall through the ground the next frame, how to avoid?

I'm trying to implement player physics with arbitrary objects, in this case, a bunch of cubes. I wanted to add a "floor" so in my cube collision function, I added the following following lines: <...
0
votes
0answers
54 views

Implement MMO like character movement without a full-fledged physic enginge?

Question: How can I implement World of Warcraft / Guild Wars 2 / etc like player movement, including jumping, without using a full-fledged physic system for my multiplayer game since players only ...
0
votes
2answers
54 views

Objects aren't rotating in sync

This is a follow-up question to How to reapply force applied to one object to another object I want to make two objects move, react to collisions and other stuff as if they were one. For example, ...
0
votes
2answers
54 views

How to reapply force applied to one object to another object

Edit: While I wasn't able to make the code work completely, I believe my question has been sufficiently answered. I want to make two objects move, react to collisions and other stuff as if they were ...
1
vote
0answers
96 views

How do I prevent falling tiles from bouncing on each other in my match 3 game?

I am working on a match 3 game in Unity. The tiles have a RigidBody2D in dynamic mode and a BoxCollider2D. When a match occurs ...
3
votes
0answers
74 views

Faster convergence in a physics engine

I've got my hands on the first edition of the book Game Physics Engine Development: How to Build a Robust Commercial-Grade Physics Engine for your Game by Ian Millington. Because I didn't really know ...
0
votes
2answers
141 views

AABB Collision Detection Confusion

I am trying to understand and implement AABB collision to learn simple 2D game physics. I'm following a tutorial and its method is a bit different to other websites. It uses the center of the object ...
45
votes
6answers
9k 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 ...
1
vote
0answers
28 views

Polygon doesn't bounce enough in edge-ground collisions (but it does in vertex-ground collisions)

I'm currently making a (basic) physics engine in Python in which I want a polygon to bounce off the ground (\$y=0\$). When a vertex hits the ground, I apply the (linear) impulse $$\overrightarrow{P}...
1
vote
2answers
252 views

How to handle player input with fixed rate variable fps time step?

I've made a system which uses the ideas from "Fix your Time Step" in order update physics. I'm having trouble finding standard methods for dealing with this when user input affects player movement ...
-1
votes
2answers
80 views

Problem making wave animation

I want to simple wave-like animation using mesh. I thought that it would look like a wave if there would be a point at the middle of the mesh and change z axis of that point, and after this I change ...
1
vote
0answers
65 views

Is it better to combine or leave alone 2D polygons

I'm making a modular system for a 2D spaceship arcade like game, the user builds their own ship with equilateral triangles to make more complex shapes. When the ships are small it's no problem, but as ...
0
votes
1answer
62 views

Detect collision point [duplicate]

I'm writing a 3D rigid body physics engine, I am using OpenGl for simulation. Only convex objects are considered. My question involves how to detect the point of ...
1
vote
0answers
147 views

Bullet physics convex hull center of mass

I am trying to make a convex hull collider for bullet physics. I am using BulletSharp.CompoundShape and BulletSharp.ConvexHullShape. This is model of a chair in unity with rigidbody and convex mesh ...
1
vote
1answer
143 views

Minimal, unrealistic physics engine

I'd like to prototype a game with custom, very simple physics. Something similar to older games, anything from Super Mario to Quake 3 Arena. I'd prefer to avoid realistic physics engine because they ...
0
votes
0answers
76 views

Solve Constraints with linear factor of 0 in Bullet Physics

In my code I need to set the linear factor for velocity to 0 (sometimes). For example, game->rigidBody->setLinearFactor(btVector3(0, 0, 0)); When this is done,...
0
votes
2answers
45 views

Dividing properties between RigidBody and Collider

I am currently making a physics engine in Rust. The 2 main data structures concerning collision detection are: RigidBody: Physics-related aspects of the body. Contains a reference to a Collider ...
2
votes
1answer
318 views

Box2D physics are different on server and client

I'm using C# Box2D library for my server and client, they have similar world.step(), iterations and update function. At the same time they have different physics' results, difference is not fixed, it ...
2
votes
1answer
143 views

How do force fields scale?

Setting I am designing a 2d game in which a \$1/r^2\$ force acts between moving charged particles, and the number \$n\$ of particles is very large. To calculate the force between all pairs of ...
0
votes
0answers
154 views

Unity like RigidBody physics in PyGame

I am trying to make game but first I want to make simple simulator. The goal is to have a ball fall onto a surface and then roll off the edge. Here is my code: ...
0
votes
1answer
251 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 ...
1
vote
1answer
635 views

Unity Physics Simulation - Limitations / Inaccuracies? Bounciness of a ball (pool/snooker balls etc)

I am playing with Unity physics engine. I have a pool table and a cue ball. Both have Physic Materials. If I start the game, with the ball floating about 1m above the table, it falls and bounces (...
0
votes
1answer
337 views

Terrain collision with sphere and OBB

I'm implementing my physics engine for my 3D game. So far I've been able to implement collision detection between OBB, spheres and planes. The engine generate contacts and resolve them with an ...
2
votes
1answer
52 views

How to make a motorcycle running on a vertical circular track(loop-da-loop) without falling down due to gravity?

I am currently developing a game, motorcycle type game. Of course, my map is not just made up of simple line or curve. For example: a vertical circular track in the map. i've seen most 2D motorcycle ...
1
vote
1answer
268 views

Wall collision response results in jittery physics

I have the following game loop : ...
0
votes
1answer
231 views

Choosing the correct normal for a collision

I have taken the task of building a basic impulse physics engine. Circle vs Circle collision resolution has been done and I moved onto Line vs Circle. I can detect a collision and know that the normal ...
1
vote
1answer
538 views

Physics - How to calculate the next position of a ball rolling against a slope?

For a small C/C++ game project, I want to add some physics on a ball, to allow it to roll against the slopes of a 3d world, in the same way as the example visible in the image below: However I have ...
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 ...
1
vote
0answers
25 views

Deformable meshes based on torsional spring

I am trying to learn physics-based animation thanks to the book "Foundation of Physically-Based Modelling and Animation". They introduce the mass-spring model for deformable meshes. Although making ...
0
votes
1answer
587 views

Unity Bowling ball physics

I am working on Bowling Ball game for android. And I want the Bowling Ball to feel like a Bowling ball in the real world. I've already tweaked the Rigidbody values and PhysicsMaterial but it's giving ...