Download

How can I call physics collision detection process by myself?

I have to say I am new here and I do not know anything about how to modify inner structures of Unreal engine. Therefore I wish someone can help me with this issue.

I am working on a physics project at university to visualize classical physics 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 to make it more precise than the previous one, 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 models by myself and I want to use 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 may try checking “simulate physics” on my objects to force it to run collision detection routinely at least.

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 can help me.