Unions have incorrect hitboxes[Solved]

I am making a script that creates a crater when you land and am using the :SubtractAsync function to create a half sphere where the player lands but the htibox is the same as the original baseplate (yes I have turned the baseplates collisions off after the union is made)

How do I fix this so you can fall in the hole?

1 Like

Try setting the union’s collision fidelity to precise, keep in mind what you are doing could degrade performance and also collisions won’t be perfect, they will be aproximated.

1 Like

I will try, I doubt it will degrade performance as it will most likely be a max of 1 or two parts that get unionised

Thank you a lot, it worked

Small percentages of areas negated from a Union don’t work too well. They won’t show up as proper holes.
You’re best off to have smaller baseplate Parts to negate the craters out of. You may want to copy the negated part if you have a border between 2 baseplates and union both baseplates with one each of the 2 crater negated parts.

I think I am already doing that, I am creating a small ball around the crater center and using :GetPartsInPart and creating a separate ball for each part then unionising them.

Sorry, not what I meant. Union hitboxes (even Precise) work by percentages.

If you have a large baseplate like in the picture and take a very small percentage out of it with a negated Part (lets call it your crater part) then the small hole may show up as a hole visually but the baseplate can sometimes still be a flat surface or a very shallow or irregular hole.

There’s a tool in the Studio settings that allows you to see the exact shape of a Union or MeshPart.
In the Studio Physics setttings click the checkbox for ShowDecompositionGeometry and go back into the workspace. If I recall you need to select the Union and change any one of the properties for it to show up as a multicoloured item showing its exact physical shape.
Unchecking the box gets you back to the normal view.
There are also plugins to do this without going into the settings.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.