Good afternoon,
I know, that PhysX was deprecated by the ~UE 5.1, though even now there are a lot of leftovers of PhysX can be found in code (speaking of UE 5.6.0), including not used code, forward declarations and some actor properties which are marked [PhysX Only] (but not used). So I have couple questions related to physics engines and current plans.
- Are there any plans to remove PhysX leftovers completely? At least, removing forward declarations of PhysX classes allow developers to integrate PhysX 5+ (PhysX 5 has templated PxQuat<T>, while UE declared PxQuat, so basic type violated ODR). I was toying around adding PhysX as a plugin, and it immediately failed because of ODR violation. I prepared a pull request, which removes all exposed forward declarations (to make future integrations possible)
- I assume one of points, why PhysX had been removed, were LWC and closed-source. Since PhysX 5 supports double-precision math, as well as it’s now open-source, are there any plans to re-introduce PhysX 5 as an option alongside with Chaos?
- PhysicsSettingsCore.h contains bEnable2DPhysics setting (default false), which is not used anywhere in code. Is it deprecated (and should not be used), and Box2D physics engine is not available for use?
- There are a lot of abstraction classes/interfaces in physics code, but I see that normally code is coupled to concrete Chaos types. There are some physics engines integrations, like Jolt engine for Unreal YouTube made as a custom plugin, “stealing” shapes from PrimitiveComponents + syncing bodies back. Developers of Brickadia actually reintroduced PhysX library based on UE 5.0.3 code, upgraded engine to UE 5.1 and then updated PhysX 3 -> 5. I know that Havok is highly integrated into Engine code and requires engine source changes to be made (this allows better integration with Unreal Engine). I understand why people want to have other physics engines: because of preferences on debatable topics like XPBD vs Impulse solvers, determinism, multi-threading or performance. Are there any plans to make more abstractions and extensions points (e.g. to have another physics engine as a game/engine plugin), or engine generally moves to less abstractions and more coupling to Chaos?
There is no urgent need to integrate one of other physics engines, but it’s good to know, where Unreal Engine moves.
Best regards