Questions tagged [physx]
PhysX is a realtime physics engine SDK. It supports rigid body dynamics, soft body dynamics, ragdolls and character controllers, vehicle dynamics, particles, volumetric fluid simulation and cloth simulation including tearing and pressurized cloth.
37 questions
0
votes
0
answers
26
views
Friction not applied in fast collisions using Continuous collision detection modes
Starting in Unity 2022.3 versions, this started happening -
In my scenario, I have a ball bouncing on a surface (e.g on concrete) and no matter what the friction values are, the ball basically ignores ...
1
vote
0
answers
96
views
Fixed timestep graphics jitter
I'm trying to implement the https://gafferongames.com/post/fix_your_timestep article but I have jitter on the position interpolation.
video of the problem
I have the following PhysX manager class ...
0
votes
2
answers
152
views
How to collide a circle against a pixel grid without getting snagged?
It's probably senseless to post my code because it simply takes a hard-stop approach when it encounters anything in the grid that is impassable (well, I've attempted to check -20/+20 deg, then -40/+40 ...
0
votes
0
answers
189
views
PhysX Skin Width
How a character controller's skin width is implemented?
I have a custom server with a traditional heightmap for terrains but when it comes to regions sitting on the terrain, I rely on 3D voxels that ...
0
votes
1
answer
227
views
PhysX overlap always returns false
I am creating a game using PhysX as the physics engine and I have a function which checks the overlapped bodies based on a sphere geometry. When there are overlapping bodies I just set a force on them....
0
votes
1
answer
86
views
τ = r × F, In unity3d/PhysX how do we define r?
How does PhysX define/calculate the distance from the center of mass where we apply the force to produce a torque?
0
votes
0
answers
263
views
PhysX Skeletal Animation
I am developing a game and using OpenGL for graphics API and NVidia PhysX for the game's physics. Recently I implemented skeletal animation from this site. The objects are read using assimp which ...
0
votes
1
answer
159
views
Detect if actors are inside another actor with custom shape
I have few actors with custom, non convex geometry (mesh) created using PxRigidActorExt::createExclusiveShape and a lot of actors with ...
0
votes
0
answers
186
views
How can I disable gravity for an object after gravity has been applied previously?
I have a rigid body component which has a field named enableGravity. This flag is synchronized with Physx objects before simulation:
...
1
vote
1
answer
56
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....
0
votes
1
answer
395
views
NVidia Physx get yaw pitch roll from rigid body orientation
I am using NVidia PhysX in the game that I'm developing and I stumbled upon a math problem. I need to retrieve Yaw, Pitch and Roll from the orientation quaternion stored in the rigid body of some ...
0
votes
1
answer
408
views
NVidia Physx Get Orientation problem
For a game that I am developing I moved from Bullet physics to NVidia Physx. The problem that I have is the following. I used to have a translation from bullet's rigid body orientation quaternion to ...
0
votes
0
answers
336
views
In Physx, A collision is detected in onContact() before the shape collides
I'm trying the collision detection example in SampleSubmarine and I'm having a problem.
As shown in the picture, when Plane and Sphere collide, the break is made at int a = 10 of the onContact ...
1
vote
1
answer
368
views
What's the relationship between the actor's pose and shape's pose in PhysX?
I have 2 Meshes and I want to add physics to them. The first is a primitive box, the second is a terrain.
The box and terrain are made with DirectXMath
Using the PhysX library, I made a copy of the ...
4
votes
1
answer
6k
views
Game Engine Memory Allocator
I'm a bit confused on how to implement an allocator for my game engine. I'm currently trying to implement PhysX for the physics in my game and it requires an implementation of an abstract allocator ...
0
votes
0
answers
185
views
How do I create a Physx heightfield from a model triangle mesh?
My question is clear: I have a mesh defined by its vertices, index... I want to transform it to a heightfield, if someone can provide some example or link to, I will really appreciate.
Thank you very ...
2
votes
0
answers
64
views
Simulating idle regulator for vehicles
I use PhysX vehicles for my vehicle simulation, however there is no idle regulator option available to use. I want to implement that to have correct overall engine behavior such as stalling and in the ...
0
votes
0
answers
1k
views
Unity: Make a moving rigidbody stop exactly at a given distance
I have an object that only moves along Z-axis, its rigidbody has a mass of 1 and a drag of 0.2.
That object accelerates till MaxVelocity and then moves at that constant velocity in the Z-axis.
When ...
0
votes
0
answers
499
views
Simulate piston for forklift using PhysX 3.4 ( Unity 2018.3 )
I need to simulate a piston for a forklift, but I don't really know how to create an accurate physics model.
The forklift ( a car with some wheel colliders ) should react to the force applied by cargo ...
0
votes
1
answer
645
views
Rendering PhysX Primitive Geometry in DirectX 12
I created a scene with two primitive geometries (Sphere and Box). Now I want to recreate what I see in the scene (PhysX Visual Debugger) in my game engine window, but I can't find any functions that ...
0
votes
1
answer
1k
views
Unity Profiling - Mesh.Bake PhysX CollisionData Doubling CPU cycles
I have a mob that, when it dies, spawns smaller versions of itself. When this happens there's a huge resource spike. The profiler narrowed it down to baking the meshes of the new objects. I have a ...
1
vote
0
answers
675
views
How to add friction to Unity HingeJoint?
I attach a rigidbody to a HingeJoint in Unity.
It's attached no at the the center of an anchor of a joint.
To stop it from falling I set Use Motor = true, ...
4
votes
1
answer
680
views
Handling of Slopes for a Character Controller
I recently moved from Bullet to PhysX to see if it would be a better solution for my game engine, and so far it is. The only problem that I'm having, which is part of the reason that I switched is ...
4
votes
4
answers
441
views
Data flow with PhysX on a dedicated GPU
If there are 2 GPUs in a PC, one processing only graphics and the other dedicated to PhysX, what is the flow of the physics-related data?
Let's say we're simulating an explosion and the PhysX ...
2
votes
0
answers
464
views
How to apply specific torque to configurable joint in Unity
I have a torque vector that needs to be applied to a configurable joint connecting two rigid bodies. This joint configured in such a way, that it only allows angular motion around all 3 axes.
Is ...
3
votes
1
answer
658
views
In Unity3D (and PhysX), how do I calculate the products of inertia?
Since unity3d uses physx underneath the surface, obviously they share the same features.
One of the features is the moment of inertia tensor - Unity3D one, PhysX one.
Though, they use the diagonal ...
0
votes
1
answer
2k
views
How to load and render PhysX 3.3 heightfield
I'm trying to load a PhysX 3.3 heightmap and render it with OpenGL using glm and glfw, but so far it doesn't seem to be working. I'm basing my code on the PhysX samples, and am also using FreeImage to ...
4
votes
1
answer
252
views
How to raycast against a physx cloth mesh?
I'm using the PhysX 3.3 SDK in a application and mostly everything is working fine. However, I'm trying to develop a feature that would allow users to click on various actors in the scene and modify ...
1
vote
1
answer
150
views
Disabling impact damage by Kinematic actor on non-dynamic destructibles (using NVidia APEX)
I have a destructible non-dynamic object at Apex scene and am hitting the object with a kinematic actor. I do not want it to be fractured by these impacts. Is it possible?
PS: the impact damage is ...
1
vote
0
answers
430
views
PhysX - Revolute joint around unit vector
I'm using a right-handed coordinate system with (0,0,-1) = forward, (1,0,0) = right and ...
9
votes
1
answer
1k
views
Using PhysX, how can I predict where I will need to generate procedural terrain collision shapes?
In this situation, I have terrain height values I generate procedurally. For rendering, I use the camera's position to generate an appropriate sized height map. For collision, however, I need to have ...
1
vote
1
answer
547
views
Physx gravity not working as expected
We have been facing a strange issue with physx vehicles. The game behaves correctly in almost every situation: jumps, impacts, etc.
Gravity is applied correctly downward.
But when the vehicle is put ...
4
votes
1
answer
1k
views
What is the integrator used in PhysX?
What type of integrator is used in the PhysX engine? Euler? Runge-Kutta?
I tried to look through the comments in the SDK header and source files. But, could not find any information about this.
3
votes
1
answer
608
views
How do I set shape density in PhysX 3.1?
I'm using PhysX 3.1. I need to give shapes different densities (there are several shapes for my single rigid actor). I know that the shape's density can be set by ...
3
votes
1
answer
490
views
Simulate 'Shock absorbtion' with tire rubber in PhysX (2.8.x)
This is a kinda tricky question and I fear there is no easy enough solution, but I figured I'd hit SE up before giving up on it and just doing what I can.
A machine I am working on has no suspension ...
1
vote
1
answer
182
views
NxWheelShape Tilt with Vision(Havok) Engine and PhysX 2.8.x
A vehicle I am working on has front wheels that can tilt(lean) left and right as well as turn left and right. The turning was pretty easy, but there seems to be nothing on how to set a WheelShapes ...
3
votes
3
answers
3k
views
PhysX Capsule Character Controller floating above ground
I am using PhysX Version 3.0.2 in the simulation package I'm working on, and I've encountered some bizarre behavior with the capsule character controller.
When I set the controller's height and ...