I was playing around with 5.6 that I just installed and came across an strange (I think) case.
I was importing a large structure (fbx) into map and since the mesh itself is huge, I decided to use itself as it’s collision too.
The mesh is about 2000 polys. I go to static mesh collision settings and set it to Complex as simple and I had the collision, however when I inspected the collisions. I realized it is not matching the mesh at all. and each import it’s collision is changing to something else and weird.
After testing a few hundred imports I realized the “Build Nanite” is the culprit.
After importing the mesh without it checked the collision was correct and as soon as I enable it, the collision becomes like that.
What is going on, I still don’t know; Even AI couldn’t give me a proper explanation as why it happens.
Next Question is, For this structure I wanted to use itself as the collision, but if I enable nanite, I won’t get what I want. Is the only solution, importing the mesh twice, one without nanite (for collision) and one with for render?
Hey there @BSarmady! Do simple mesh hulls calculate correctly or do they have the same issue with being offset?
Unrelated to your collision issue; Nanite itself isn’t actually meant for such low poly geometry, and you get diminishing returns using the tech the lower poly your work is.
Thanks for reply. The mesh is not that small or low poly, I reduced the face count and complexity to a box to figure out what is happening.
It seems when enabling nanite on a collision mesh, it tries to simplify it.
You can try this by importing same mesh from FPX twice, one with nanite enabled and one without, then use each mesh as collision for other one and see the difference (show collisions in mesh details window).
My apologies, small and low poly is a misnomer since I can’t see the geometry and it seems like part of a giant wall or background art. More accurately what I meant is that I wouldn’t personally use Nanite for this structure since the shape is simple and you’re already using textures to fake depth. Unless the player is climbing it up close and personal the geometry could be rather simple.
To refocus on your issue though; It seems the collision hull generation for Nanite is definitely bugged. I can replicate a similar issue where the hull is inaccurate for shapes with more complex (like convex points). Might be worth the bug report in the meantime:
UE has been doing the same thing to me on every model import including when it rebuilds nanite. It creates a stupid collision mesh and nobody on these forums ever bothers to reply or offer assistance.
This is a bug that has been going on since updating to 5.6
I noticed it immediately when my game would break upon pressing play. I couldn’t move and the camera would slide into the ground and disconnect itself from the 3rd person actor. All because UE decided to create these broken collision shapes.
The fix is to open the mesh and delete all collision boxes first before setting a custom collision. Don’t bother to create a new collision box because the thing isn’t doing them right and acts broken.
Not like anyone has been taking me seriously over this since I’ve posted twice on these forums. Now other people are experiencing the same bug. Maybe that will get their attention.
It’s a bug and I have the exact same problem. It’s happened to me a few times and nobody on the forums have bothered to respond to either of my posts about it.
The issue started when I updated to 5.6
My project predates 5.1 and has worked through every update until now.
Hey there @EN6A6E! Thanks for the extra information! It will help pinpoint what change could have caused this issue. The forums are often great for information about well trodden issues, but new, less common, or difficult ones can often be overlooked by much of the userbase.
What I was trying to say is I had the issue with a more complex static mesh, noticed the problem and then tried it with a simple mesh (what you see in the screen is all of it 24 quads in total) and that’s what I got for collision mesh when I have selected Use Complex for simple collision
The other mesh you see the character is standing on it, is not part of this mesh it is a separate one.
The solution I found was to Import the mesh once for render, with nanite enabled and then Import it once more with different name without nanite enabled to use as collision box
This would make my asset directory huge, if I want to continue like this.
I was hoping this was a issue with the way I’m doing stuff, and there is a better way.
It looks like It somehow become a norm with unreal engine. with 5.0.1 some stuff was fixed and some more broke, same in 5.1, 5.2, 5.3, 5.4, 5.6 each one has something broken that was working before or I was saw it as benefit and wanted to use it, which then it didn’t work and push me back to previous version due to some other broken stuff.
I’m seeing this as a hard barrier for Indy developers to join which I’m pretty sure doesn’t exist for larger companies, because they immediately get support sometimes in minutes!
The company that I know still works with 4.26 engine and they have no plan to upgrade to 5.x anytime soon, and I guess I know why. This makes my learning progress harder and making a game as Indy even harder than that.