Thinking about ways to improve it got the gears turning in my head, and it hit me pretty quick: What if there was a new asset type called “CollisionMesh” (or something similar) where the user could upload a mesh that has under or equal to say, 650 triangles. The mesh would be limited to low triangle count, but would always have an exact decomposition applied to it where the engine goes by the exact vertices of that collision mesh.
Having our own collision model assets could strongly benefit developers because we could use these for areas of a place that rely on meshes with precise collision, more where the players may get confused as to why the collisions are a bit off.
After thinking, there are a few drawbacks to doing this:
Union support? How would CSG handle this?
Would having a lot of collision models degrade performance? How would mobile devices behave?
How would applying collision meshes be handled? Would it be an ID-based property, or would it be tied into the mesh data stored within roblox?
Would having an ID be beneficial even if it may not reflect the shape of the visual mesh? (i.e. a mesh of a house that has a door, collision model excludes the door even though it’s shown on the model)
Please, give feedback. I could personally use this feature quite a lot. It would be a very nice tool to have.
Not saying we will do it, but we have discussed something along these lines before. If we do do it, I think the only way this will happen is differently:
We’ll come up with some way to tag an object in Blender/etc. as “collision” geometry, and when importing the FBX we’ll compute the physics data based on this object, and set CollisionFidelity to Custom to indicate that.
So when importing a mesh, if you have collision geometry there, we’d use that instead of the visual geometry to compute physics data. We’ll still need to do convex decomposition on it - or maybe we’ll treat each collision mesh you have as a convex hull, so if you have a concave mesh we’ll close the concavities in it, but if you have 4 convexes we’ll just preserve them as is - this needs some thinking through.
Hate to bump an old thread, but I really think this should be implemented sometime. (also considering most platforms have this feature already)
Another use case I’ve recently stumbled upon is with roads. I’ve relied on importing mesh roads as wedges with either obtuse or reflex surface angle like this:
Our vehicles rely on raycasting downwards the rays do not detect the connected faces on obtuse surface angles causing undesired physic problems due to relying on parts to try and solve that (which don’t come close to accuracy compared to meshs).
The benefits of this feature to the community include:
Simple straight forward collisions for mesh’s with hole(s)/concave areas in them.
No need to create custom hitbox’s with invisible parts
a.) Would not need to render physics for 5 sides of a triangular part compared to one singular face.
Splitting developer production time in half.
More accurate collision maps for more user interactive items.