Download

Any PhysX SDK users out there to help?

I’m currently writing a movement component for my Vehicle class, which is based on a similar design to Character Movement. That is, the movement component computes all the ‘Physics’ itself. This needs to be done to ensure that client-side prediction is accurate and syncing timestamps remains relatively trivial. Trying to run a physX simulation on the objects and split the update / replication work over two different tick groups (Pre / Post physics) is a nightmare - so I’ve opted to not simulate physics on the vehicles and instead take this approach.

Everything is working as intended, and aside from collision - everything simulates the same way in my movement component as it does on an object simulating physics. The problem now is collision force rejection. When two objects that are simulating physics collide with each other, they apply force / torque (or maybe even acceleration) to each other - and that’s what I now need to simulate.

However the PhysX SDK is pretty large, and while I’ve found where forces are applied (NpRigidBodyTemplate.h), I can’t work out where the forces from two collisions are calculated. If anybody knows where in the SDK I can find that code that’d help me out a lot!