Hello,
I am using Unity Physics as a collision solution for my custom physics engine, however, the collision scheme only requires the closest points of the hulls without any other additional information. Therefore, I think I would like to disable EPA, since I only need closest points. Also, I don’t need any contact jacobians(can be disabled with flag) or the solver itself. Perhaps an option here is to rework the narrowphase system myself and delete the scheduling code for the solver and jacobian related tasks. I am looking for ideas.
Thanks a lot, feedback is considerably helpful and appreciated.
Can I safely comment out the following code? I’ll keep the callbacks but I’m hoping that this is modular enough that removing it for my own replacement stuff should be safe? Is this a good approach, since I don’t need Jacobians/Integrator/Solver since collision response and integration is handled on my side?
// Create contact Jacobians
handle = Solver.ScheduleBuildContactJacobiansJobs(ref input.World.DynamicsWorld, input.TimeStep, math.length(input.Gravity), ref m_Context, handle);
handle = callbacks.Execute(SimulationCallbacks.Phase.PostCreateContactJacobians, this, ref input.World, handle);
// Solve all Jacobians
handle = Solver.ScheduleSolveJacobiansJobs(ref input.World.DynamicsWorld, input.TimeStep, input.NumSolverIterations, ref m_Context, handle);
handle = callbacks.Execute(SimulationCallbacks.Phase.PostSolveJacobians, this, ref input.World, handle);
// Integrate motions
handle = Integrator.ScheduleIntegrateJobs(ref input.World.DynamicsWorld, input.TimeStep, handle);
Go for it. You might want to just create your own implementation of ISimulation at this stage 
1 Like
At this point, it seems custom ISimulation is inevitable and it makes sense so that updating Unity Physics doesn’t overwrite my code when I update it.
Though my concern is I am not sure yet how to run a custom ISimulation.
(Edit: new thread for custom ISimulation discussion:
https://forum.unity.com/threads/how-to-run-a-custom-isimulation-of-unityphysics.790856/ )