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.

Filter by
Sorted by
Tagged with
0 votes
1 answer
38 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
51 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 ...
  • 33
0 votes
1 answer
54 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 ...
  • 111
0 votes
0 answers
32 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: ...
  • 189
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....
  • 189
0 votes
0 answers
21 views

NVidia PhysX in combination with NVidia Flex

The question I have is how to combine NVidia PhysX together with NVidia Flex, so that the particles from Flex will interact with rigid bodies from PhysX. The documentation has a stand alone version ...
  • 33
0 votes
1 answer
49 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 ...
  • 33
0 votes
1 answer
31 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 ...
  • 33
0 votes
0 answers
101 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 ...
0 votes
0 answers
26 views

PhysX Dealing with CCT and static rigid body collisions

recently I've been implementing physx's CCT system to my engine. The problem is that there is absolutely no collisions between CCT Actors and static rigid bodies. As I write these words I still can't ...
1 vote
1 answer
108 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 ...
  • 143
3 votes
1 answer
3k 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 ...
  • 209
0 votes
0 answers
103 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 ...
  • 1
2 votes
0 answers
37 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
726 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
364 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
298 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 ...
  • 3
0 votes
1 answer
903 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
615 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, ...
  • 595
3 votes
1 answer
384 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 ...
  • 151
4 votes
4 answers
320 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,244
2 votes
0 answers
343 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
534 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 ...
  • 3,318
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
198 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
133 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
385 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 ...
  • 111
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
445 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 ...
  • 31
4 votes
1 answer
805 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
525 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 ...
  • 31
3 votes
1 answer
426 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,229
1 vote
1 answer
153 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 ...
  • 1,229
3 votes
3 answers
2k 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 ...
  • 387