Download

Custom StaticMesh import plugin, meshes can't be raycast.. any ideas?

I thought we were all good with our custom mesh importer. Everything seemed to be fine, but today I ran into a big issue. Apparently if you cast a ray at an object importer with our importer, it will not collide. The issue was exposed when using the Trace By Channel node in Blueprint. I tried the exact same mesh imported via our method and via FBX and the collision works fine with FBX.

So we are missing something in the import or creation of the mesh. Obviously I don’t expect anyone to know our code or be able to say what we did wrong, but I was hoping that maybe someone might have some idea of what we might have missed or where we might look? The trace was a complex trace so it should be against the actual geometry if I understand things, not the collision mesh. But just as a check I did create a collision mesh and still got no collision. I verified that the mesh was set to BlockAll and I couldn’t find any obvious difference between the working and non-working meshes.

Switch LogPhysics to VeryVerbose, maybe in the log file you will find usefull information.

Check collisions with pvd:

  1. launch the editor, load map with your mesh
  2. run pvd
  3. go to editor , start gameplay and type in the console “pvd connect”
  4. go to pvd and check if your mesh is here and how collision looks