Please enable `BasePart:GetClosestPointOnSurface()`

As a Roblox developer, there are often scenarios where I want to find the closest accurate point on a basepart’s surface (cylinders, meshes, cubes, etc). Roblox released an API for this in May of 2023 :

However, this API has been disabled for nearly 9 months (it’s only usable in studio), so we are unable to make use of these in live servers. As a result, we’re forced to make approximate guesses and can only work with basic shapes, which severely limits the functionality of certain game mechanics (e.g. a climbing ability that works on arbitrary shapes).

48 Likes

God yes. Please. Please. I’ve been building a new feature for my game that depends on this API. Imagine my dismay when I found out the API was not enabled in live game servers and that my hard work may go to waste!

Please, this is such a useful API. Please enable it.

5 Likes

Full support. Was trying to find the closest point on a model from a single point for the purposes of applying explosion damage based on distance a few months ago only to find that I had to make my own functions from scratch (see below) since the API still isn’t enabled. Here’s hoping it gets enabled soon for ease of use at the very least.

2 Likes

Imagine my surprise and pain seeing this error right when I finished writing a huge chunk of code that was dependent on the assumption this worked:


Terrifying. Hopefully Roblox enables this quickly.

This function was briefly enabled in some release version a few months ago and disabled shortly after, and has never been re-enabled since. I’m not sure why since it worked perfectly fine when I used it.

One thing I learned from that brief usage is that the surface is based on the CollisionFidelity and not the faces of the part/mesh. This could change when it returns though. If not then someone will make a similar function using Editable Meshes.

Turns out there already is a function with the same name for Editable Meshes: EditableMesh | Documentation - Roblox Creator Hub

1 Like

We still have a big need for this!

2 Likes

We NEED this
I’m so disappointed. I just wrote an entire grabbing system surrounding this but it’s disabled in-game! Me and my friends were so hyped to test…

1 Like

For some reason, it’s specifically gated behind the CSG Beta

And four weeks ago it was promised to be enabled in a couple of weeks.

Not sure how big is a ‘couple’, but I hope it will get here soon™.

10 Likes

Thank you for the update :pray: three zero characterss

That CSG beta has just released and includes BasePart:GetClosestPointOnSurface() like you mentioned,. so now it’s enabled for live experiences. :smile:

10 Likes