I am working on a classical physics project at university to visualize physical phenomena, and I have read through some documents on basics of physics engine. Therefore, I have a plan to build all physics in my own code and place the objects at calculated positions every frame to run it in Unreal. In other words, I am going to use Unreal to run my own physics engine. However, I cannot work with polygons by myself and I want to use models and the collision detection system provided by Unreal so that I can skip the issue of shapes. To my knowledge, in the in-built system, the collision detection is called every time after physics update. It checks all interpenetration of physics bodies and it generates hit data structures and events and removes interpenetration. What I want to do is to manipulate and call this function by myself, so that I can obtain interpenetration data of objects and control the behaviour of collision, and I will also call collision detection more than once in one frame. Ideally I want to use the collision detection system only; if I cannot, I will try checking “simulate physics” on my physics objects to force it to run collision detection but I will control position data of objects by myself.
I read the website of Physx. However, it said that only convex polygons were supported. Therefore does Unreal not directly use Physx collision detection? I do not know how it actually works and also I cannot find detailed information on API websites. I think maybe there is no direct way to do this. But anyway, I hope someone knows how to deal with these inner structures and can help me.