Physics asset causing BAD lag issue.

Hello everyone, im hoping somebody might have some insight. Quick note: My project is made as an MMORPG. I have my AI characters in my game and they were causing BAD frame rate loss. I managed to eventually figure out it was the physics asset was the culprit and once i set the physics asset to none on the skeletal mesh of each enemy AI, i gained a huge performance boost.
With 300 AI on screen i get around 75+ FPS, but when the physics asset is enabled i go down to around 24 FPS. It used to be much worse but i managed to enable some optimizations. I was quite happy with the results since i dont really needs physics on the asset and can just use the capsule for overlaps and the like. While this could work for me, i ran into another issue. My AI can have their Mesh change size (not the capsule, literally the mesh itself. I want the capsule to stay the same size so enemy’s spread out at the same distance regardless of size). Because of this i also want it so i can left click the ‘mesh’ to target an AI, that way if you come across a huge enemy the left click to target registers.
The problem: This doesnt work without a physics asset :frowning: I have tried many different things and have had little luck.

Things i have tried with the same character on screen x300:


I also tried this:
*Duplicating the skeletal mesh asset and regenerating the sphere’s based on a larger size so it ignores the smaller bits of body parts and mainly goes for the big pieces. Went from many spheres to just around 7. Result: FPS 39-42

I can not for the life of me seem to increase performance beyond 48+ FPS. Performance is great without the physics asset but its required i guess if i want mesh targeting. Any thoughts on how i can keep my performance while not using physics asset and make mesh targeting work? Currently it uses Get hit under mouse cursor using visibility channel for detecting on left click and then if true sets target.

Here is the Capsule and Mesh settings:


And here is my left click targeting:

Bumping this since no reply as of yet.

Just for your information Chaos physic is not well optimized. They are good in quality but not in performance. They introduced it in 4.26 and used it fully in UE5.

Unfortunately, there are no way around it. My guess will be you have to disable it by distance. If you still want to use it in distance or it doesn’t work for you, then I suggest to move to programmable physic simulation which is available in other game engine.

1 Like

Well thats annoying haha. For now what i’ve done is just regenerated the physics asset to use many less volumes for body parts. Went from like 30 something to 7. Got a pretty acceptable boost from that. I mean fingers done need a volume on them, its not some shooter game or body part slicing game haha. Should be okay for me for now but its just so very unfortunate that its not more optimized.

I have encountered the same issue as you, which makes me very troubled. Have you solved it?

I dont think there is any solving it, its more of managing it.
What i did was i have 2 physics assets per skeleton. 1 is the original and the other i duplicated and added on the word _Simple. I regenerated that simple physics asset to only have 1 or 2 volumes, if 1 its the torso one and encompasses the whole skeleton from its head to its toes. If i ised 2 for whatever reason, it would be a small one for the head and 2nd one for the neck down. I set the simple version to be what the skeleton has set by default. This gave me quite a boost to fps since there are tons less volumes moving around from those physics assets per enemy.

For the advanced, i use blueprint code to change to the advanced physics asset anytime i scale the AIs body to be bigger, this way if i have a large enemy then he will be using the advanced version of physics asset so i can click between his legs without actually targetting him(when i left click, target is set) plus his body parts (mesh) are perfectly accurate when clicking. Think of it like a giant humanoid with normal sized versions of him all standing under him. If he (the giant) was using the simple asset then i would always hit his 1 volume from his body that goes to his toes, but if he was the advanced physics then those are way more precise and thise volumes follow his legs, etc.

Now since all my normal sized AI are on the map using simple asset, i get that boost to fps and if i scale an enemy during gameplay, its a repnotify to scale his mesh plus change to his advanced physics asset variable.

I get the best of both worlds.

1 Like

A physics asset causing bad lag can be a significant issue in gaming and simulation environments. Physics assets are crucial for realistic interactions, but complex or poorly optimized assets can strain system resources, leading to performance issues like lag. Common causes include excessive collision checks, complex geometry, or inefficient physics calculations. To resolve this, developers can optimize physics assets by simplifying geometry, reducing collision complexity, and optimizing physics settings. Testing on various hardware configurations helps identify and address performance bottlenecks, ensuring smooth gameplay experiences without compromising on realism.