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
2 answers
68 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 ...
iPaul's user avatar
  • 1
0 votes
0 answers
54 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 ...
iPaul's user avatar
  • 1
0 votes
0 answers
33 views

PhysX 5.1 particles do not collide with rigid dynamic actors

I'm currently using PhysX 5.1 for a game that I'm developing. Although everything seems to work fine I can't get the particles to collide with rigid dynamic actors (Box shape). Note that the particles ...
Mike F's user avatar
  • 143
0 votes
1 answer
89 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....
Mike F's user avatar
  • 143
0 votes
1 answer
48 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?
RhinoPak's user avatar
0 votes
0 answers
128 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 ...
Mike F's user avatar
  • 143
0 votes
1 answer
70 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 ...
Raffallo's user avatar
  • 111
0 votes
0 answers
88 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: ...
Gasim's user avatar
  • 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....
Gasim's user avatar
  • 189
0 votes
1 answer
172 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 ...
Mike F's user avatar
  • 143
0 votes
1 answer
159 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 ...
Mike F's user avatar
  • 143
0 votes
0 answers
201 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 ...
문형준's user avatar
1 vote
1 answer
216 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 ...
ma1169's user avatar
  • 143
4 votes
1 answer
4k 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 ...
Sammi3's user avatar
  • 219
0 votes
0 answers
153 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 ...
Brahim's user avatar
  • 1
2 votes
0 answers
49 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 ...
Vitaly Varyvdin's user avatar
0 votes
0 answers
930 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 ...
40detectives's user avatar
0 votes
0 answers
412 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 ...
Leopoldo Juárez's user avatar
0 votes
1 answer
400 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 ...
Veasst's user avatar
  • 3
0 votes
1 answer
947 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 ...
Jesse Williams's user avatar
1 vote
0 answers
636 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, ...
Skyblade's user avatar
  • 605
3 votes
1 answer
461 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 ...
BlueSpud's user avatar
  • 151
4 votes
4 answers
340 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 ...
NPS's user avatar
  • 2,304
2 votes
0 answers
388 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 ...
IlliakaillI's user avatar
3 votes
1 answer
583 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 ...
tomsseisums's user avatar
  • 3,346
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 ...
Liordino Neto's user avatar
4 votes
1 answer
212 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 ...
user3271579's user avatar
1 vote
1 answer
134 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 ...
Semih Kekül's user avatar
1 vote
0 answers
403 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 ...
Silverlan's user avatar
  • 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 ...
Sion Sheevok's user avatar
1 vote
1 answer
461 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 ...
Ender's user avatar
  • 31
4 votes
1 answer
869 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.
Ashwin Nanjappa's user avatar
3 votes
1 answer
549 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 ...
hywei's user avatar
  • 31
3 votes
1 answer
435 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 ...
Mungoid's user avatar
  • 1,229
1 vote
1 answer
155 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 ...
Mungoid's user avatar
  • 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 ...
Jannie's user avatar
  • 387