Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Collider doesn't get created by the CreateMesh Module
#3
(12-19-2023, 12:03 PM)_Aka_ Wrote: Hi
Does the Unity console show any error message? If not, please send me a reproduction case so I can debug it.
Have a nice day.

Hi,

Thanks for the reply.

No, there are no error messages in the console.

However, I managed to solve this by myself.

The problem was that in the Create Mesh module, I had disabled the "Auto Update", since in the documentation says that "If enabled, MeshColliders will automatically update if the mesh changes". I want to create meshes (for racetracks) in the editor only, so the meshes would never be changed at runtime, and therefore no need for auto-updating MeshColliders. Nevertheless, MeshColliders don't get created at all if Auto-Update is disabled. I enabled it and the MeshCollider was created.  But I would really prefer to have the MeshCollider created even with Auto-Update disabled since it doesn't serve any purpose to keep checking if the mesh changes in the use case that the mesh would never change.

However, I ran into a much bigger problem:

The MeshCollider that gets created does not correspond to the generated mesh!

The generated mesh seems to get rendered correctly, but on a closer look even though the top and right views look OK, the left view isn't visible. I increased the Input Spline's Cache Density to 100 and Max Points per Unit to 100+ and the Resolution of the Shape Extrusion module to 100 (just in case it were the source of the problem) but no change.

I played around with all the settings and finally, the problem was fixed, but the fix seemed very weird and counter-intuitive:

I set the scale X of the Shape Extrusion module to 1.18 (initially 1) and the MeshCollider finally got the shape of the generated mesh (strictly speaking it still doesn't correspond to the mesh, since it has the shape of a box).

However, the mesh's left side still doesn't render correctly.

I have attached some images for clarity.

I'd really appreciate your help to make this work correctly.


Attached Files Thumbnail(s)
                       
Reply


Messages In This Thread
RE: Collider doesn't get created by the CreateMesh Module - by pako88 - 12-19-2023, 06:48 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  snap to the curve created by the curvy splines segment points ShiroeYamamoto 3 11 04-02-2024, 02:24 PM
Last Post: _Aka_
  CurvyGenerator not refreshing until next frame when created. Lupos 2 7 06-08-2023, 12:12 PM
Last Post: _Aka_
  Custom Spots Filter Generator Module mercior 3 9 03-10-2023, 10:20 AM
Last Post: _Aka_
  Bug with an HDRP project that doesn't use the Standard shader Ferdinand 2 5 10-17-2022, 03:16 PM
Last Post: _Aka_

Forum Jump: