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
-1
votes
2answers
58 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
55 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
0answers
18 views

how to find point intersection of two segment in 3d after they collide? [duplicate]

I'm working on collision boxes project and I found a problem that when I detect the collision with the algorithm of SAT and knew that the collision was edge\edge I couldn't find the the point of ...
0
votes
1answer
32 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
50 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
68 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
33 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
20 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 ...
0
votes
0answers
33 views

Full energy transfer between two identical objects

I'm trying to simulate a game like billiards / shuffleboard / curling where two objects collide and under a perfect direct hit all energy is transferred to the second object. Both ...
2
votes
1answer
91 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 ...
0
votes
0answers
33 views

How would I go about implementing crowd physics?

I'm working on a wave based game where enemies come at you in waves, and I'm stumped on this. I've tried a few things, but nothing really has worked. This is in 2D. It would look like a crowd of ...
2
votes
1answer
101 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
64 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
89 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
147 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
137 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
50 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
126 views

Wall collision response results in jittery physics

I have the following game loop : ...
0
votes
1answer
70 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
165 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
20 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
331 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 ...
0
votes
2answers
64 views

How do I determine the slope of a curve?

I am making a 2D game where the character rides on the curve of a graph. I need to find out whether the player is going uphill or downhill and calculate speed accordingly. The problem is that I am ...
6
votes
4answers
298 views

physics engine without time steps

I'm looking for physics engines that doesn't use time steps. I don't think time steps are reliable, and I don't like how without tweaking the engine a bullet going too fast can pass through a wall ...
2
votes
1answer
71 views

Transfering an inertia tensor from local coordinates to another one

If we have an inertia tensor in local coordinates with a basis matrix B and we want to transform it to other local coordinates with basis matrix A, is it right to do the following: A* inv(B) *Inertia ...
0
votes
1answer
22 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 ...
2
votes
1answer
162 views

Impulse resolution for purely rotational collisions (relative linear velocity = 0)

I've been writing a basic physics engine, (loosely) following Randy Gaul's online tutorial. I have been using this equation that he derives: $$j=\frac{-(1+e)((V^A-V^B)*t)}{\frac{1}{{mass}^A}+\frac{1}{...
0
votes
1answer
67 views

How can I resolve collisions a little better?

I'm currently developing a physics engine and I'm not sure the best way to go about resolving my problem. I have a little box, that I can move around with in my scene. When I'm resolving collisions, ...
0
votes
1answer
42 views

Applying friction force not working correctly

I have a simple physics simulation I'm creating whilst following the Nature of Code tutorials on YouTube by Daniel Shiffman, at the moment I've just started learning about friction and have had a go ...
1
vote
0answers
57 views

Modern way of getting points within a distance?

I'm making a game engine, and some components may want to interact with others based on distance. Currently, the component registers an update listener which runs on a loop, then it checks the ...
1
vote
0answers
39 views

Gauge vibration

Hello guys Im programming a gauge animation where there is a needle that points to certain values lets say each value equals to the amount of degrees the needle has to rotate to reach said value ...
2
votes
2answers
728 views

Why not derive velocity from position updates in games?

Is there a reason why retrieving velocity of a 3d object in a game engine vs deriving it from position updates is preferable? I am currently polling position at every step and deriving current ...
1
vote
0answers
39 views

Weird issue in collision resolution of non-static bodies

I'm a bit of a beginner in engine development, so I decided to write my own engine from scratch so I could learn more about what happens under everything. I've been progressing fairly well, except ...
1
vote
0answers
378 views

2D physics engine: Impulse based collision response with contact point manifold

I'm implementing a 2D physics engine where collision response is based on impulse computation. I'm going to first expose the context, then the problem, and finally the questions. Context Simple ...
1
vote
1answer
41 views

Can an unmodifiable 3D map be one large model or many small models?

Unmodifiable meaning that any ingame actions have no result on the terrain. Like in Source games. Question: Should I export one large model of the map, or should I split it into smaller chunks? If ...
0
votes
1answer
173 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
1answer
432 views

Looking for collision detection algorithms for broad and narrow phases between non-convex polyhedrons

I have some experiences on particle system simulation (namely DEM - Discrete element method), in which an individual particle with realistic shape (convex and non-convex) is approximated by gluing 3D ...
2
votes
0answers
178 views

Bullet Physics Scaling rotational part of 6DoF Spring Damper

I am currently trying to scale up my setup (consisting of two rigid bodies connected by a btGeneric6DofSpring2Constraint) to fall within the suggested dimensions for a concise simulation. In order to ...
0
votes
1answer
354 views

Should a bowling game use a 2d or a 3d physics engine? [closed]

I'm creating a bowling game in flash+as3. I'm new to physics engines, so, to start I've begun to learn Box2D since I've heard it's one of the most popular physics game engines. Currently, I'm not ...
0
votes
1answer
303 views

How do I prevent a Box2d dynamic body from sticking to static body walls in zero gravity?

I'm still making this air hockey game. I have it mostly there now, but the dynamic body which is the puck always sticks to the walls (static body rectangles that form the border of the table). I read ...
2
votes
0answers
327 views

3D Physics Engine Collision Response: Solving Simultaneous Collisions via equation

I have been implementing a basic physics engine for a small game project I'm working on. It has very specific requirements, so I decided to try and write my own physics engine to meet them. I found ...
2
votes
1answer
84 views

How to detect and prevent the resolution of fake collisions?

I'm creating my own physics engine and I came across a small inconvenience. Here how it goes: when a body tries to push into something it really can't push, it gets pushed back (which is completly ...
0
votes
1answer
990 views

Integrating Unity physics with Entitas

I've used Entitas a bit and it appeared to me as a great way of creating clean, modular code. I've seen few examples of games created with this framework, and most of them were puzzles, TD's, simple ...
3
votes
2answers
764 views

What is inertia in a physics engine?

Inertia seems to be useful in a physics engine, so useful that even in Box2DLite, a demo of Box2D it hasn't been omitted. See this Body class from Box2DLite: ...
2
votes
2answers
513 views

Physics engine and squishing of stacked objects

I have a general question that seems to apply to most physics Engines (Box2D, Unity, Matter.js, …). I'm trying to make a tower of rectangular objects that are stacked on the [static/mass=infinity] ...
-5
votes
1answer
506 views

Quake Physics ported to Unreal Engine? [closed]

My eSport mod needs the Quake 3 physics -- as well as some modern engine features. Options are either: Quake Engine: Upgrade/develop new rendering,etc component(s) Unreal Engine: Port physics. ...
0
votes
1answer
135 views

Problem resolving rotation between sphere-sphere collision

I have developed a collision detector that return collision data, as collision normal, collision point, interpenetration, etc. And now I am developing a collision solver. The collision solver compute ...
3
votes
1answer
234 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
36 views

How to throw b2body with various speed at fixed position?

Above image is for ref to better representation. I have box2d object and i know start point & end point position. Now i want to give any force or impulse such that b2body will first collide at ...