Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

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 vote
1 answer
53 views

Why do physic engines apply force fully linear, despite adding torque

I checked how the applyForce function on rigid bodies in 3 different physic engines work (cannon.js, matter.js, PhysicsJS) and it seems that this is the common way ...
user avatar
12 votes
2 answers
2k views

Moving player inside of moving spaceship?

INTRO: I am trying to achieve a spaceship that flies through space and the pilot can get out of their seat and walk around the ship and place physics objects in it while the ship is moving, rotating, ...
user avatar
  • 155
1 vote
1 answer
27 views

Configurable Joint rotation doesn't seem to respect mass difference

The Problem I've run into a physics issue in my Unity project, and have put together a simple example scene to illustrate it. Hopefully someone will be able to tell me if I'm doing something wrong. In ...
user avatar
1 vote
1 answer
12 views

What can I set in rigid body and collidable objects to ensure that the angle after collision is larger?

I have a rigid body with sphere shape attached and a static collidable box. When sphere hits the box at an angle, for some reason, the angle that it bounces off from is really small: https://imgpile....
user avatar
  • 189
0 votes
2 answers
73 views

In physics engines, what are the differences between moving an object with transform.translate and using RigidBody related functions like AddTorque?

I'm trying to recreate the ball maze puzzle game from Breath of the Wild with Unity. This is what I currently managed to make: As you can see, it's not nearly as smooth and I feel like I lack the ...
user avatar
0 votes
0 answers
15 views

Solving for radius and acceleration in spherical motion

I'm trying to solve a spherical motion problem which requires that I use applyForce and applyTorque methods in Javascript's Physijs engine (bullet3 transipiled with emscripten) I have peripheral ...
user avatar
0 votes
0 answers
119 views

Unity - Billiard balls unrealistic movement

So, I have this problem, even when I apply a small amount of force, the balls seem to get pushed away easily. Here's how they should behave (GIF from 8 ball pool game): And here's how I have it : ...
user avatar
0 votes
0 answers
86 views

character movment and physics on 2d game

I'm developing a client/server multiplayer game. in server side i need prevent players cross map objects like walls also i need prevent player go inside each others, instead want to slide them along ...
user avatar
  • 113
0 votes
0 answers
35 views

Weird Collision Response occurring between 2 objects

I have been trying to program collision response between two objects (with AABBs) and the response is not what I except. Instead of bouncing off (reflective to the collision normal) each other the ...
user avatar
0 votes
1 answer
50 views

Simulating a small world with Box2D

I would like to use Box2D to simulate a small world, with entity sizes around 1cm (0.01m), some smaller than that. Box2D's FAQ says twice: Your moving objects should be between 0.1 - 10 meters. You ...
user avatar
1 vote
1 answer
112 views

Should delta be applied to every change per frame ? (e.g. acceleration, deceleration, jump, etc.?)

I have written a game based on another game's original physics. I have all the constants the original game used in the Sega Megadrive. For example: ...
user avatar
0 votes
1 answer
106 views

How could I move an object, while respecting the gravity and other related physics in Unity?

How could I move an object, while respecting the gravity and other related physics in Unity? I tried using the following approach: ...
user avatar
  • 238
0 votes
0 answers
23 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 ...
user avatar
15 votes
1 answer
2k 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?...
user avatar
  • 15.4k
1 vote
0 answers
58 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 ...
user avatar
4 votes
1 answer
1k 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 ...
user avatar
0 votes
0 answers
136 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 ...
user avatar
  • 541
0 votes
0 answers
28 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 ...
user avatar
  • 1
0 votes
1 answer
54 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 ...
user avatar
  • 11
1 vote
1 answer
237 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 ...
user avatar
2 votes
1 answer
64 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}(...
user avatar
  • 31
1 vote
1 answer
100 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, ...
user avatar
2 votes
1 answer
86 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 ...
user avatar
0 votes
2 answers
216 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 ...
user avatar
0 votes
0 answers
81 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 ...
user avatar
0 votes
0 answers
53 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 ...
user avatar
1 vote
0 answers
48 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 ...
user avatar
  • 11
0 votes
0 answers
86 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 ...
user avatar
1 vote
0 answers
79 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 ...
user avatar
0 votes
0 answers
68 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 ...
user avatar
0 votes
0 answers
160 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 ...
user avatar
0 votes
2 answers
145 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 ...
user avatar
  • 318
0 votes
0 answers
512 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 ...
user avatar
0 votes
0 answers
44 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 ...
user avatar
  • 111
0 votes
0 answers
24 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 ...
user avatar
  • 111
0 votes
0 answers
32 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 ...
user avatar
  • 3
0 votes
1 answer
131 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 ...
user avatar
2 votes
2 answers
893 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 ...
user avatar
0 votes
0 answers
34 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? ...
user avatar
  • 101
1 vote
0 answers
220 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. ...
user avatar
0 votes
1 answer
648 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 ...
user avatar
1 vote
1 answer
109 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, ...
user avatar
0 votes
0 answers
50 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....
user avatar
3 votes
1 answer
271 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 ...
user avatar
  • 1,007
0 votes
1 answer
89 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: ...
user avatar
  • 49
1 vote
0 answers
47 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 ...
user avatar
0 votes
0 answers
73 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 ...
user avatar
1 vote
2 answers
1k 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 ...
user avatar
0 votes
0 answers
220 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 ...
user avatar
0 votes
2 answers
60 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, ...
user avatar

1
2 3 4 5