Request for Collision Contact Points Information

Hey there!

I wanted to bring up a request for an improvement in the collision detection capabilities and obtaining contact points during collisions. Example use cases within the movement system I aim to replicate:

  • Movement on slopes
  • Resetting state based on contact surfaces. I want to reset the state when in contact with the floor but avoid resetting when in contact with walls. Instead of manually marking each surface, I intend to determine walls and floors based on the angle of contact.
  • Sticking to the ground in custom gravity system

In Unity, I have utilized the Collision.GetContact function, which provides valuable information about contact points during collisions. This allows for precise control and customization of movement systems. Here is the documentation for reference: Unity Collision.GetContact and Unity ContactPoint.

In contrast, Roblox offers the GetTouchingParts function, which returns the object with which contact occurs but lacks detailed information about the contact points. The documentation for GetTouchingParts can be found here.

Alsoo, in Studio Settings → Physics we have “Are contact Points Shown”. This information displays where objects are colliding. If it’s done using the physics engine features and not just raycasting, then it’s already implemented. However, having an API for this would be great.

Here is demonstration of contact points (red points) enabled in StudioSettings:

And in this demonstration you can see direction of collisions (red arrow)

My request is:

  1. Enhance GetTouchingParts: It would be awesome to have a function similar to Unity’s Collision.GetContact that provides accurate contact points during collisions. This would give us more flexibility in creating custom movement systems.
  2. Expose Collision Debugging Information: Roblox Studio provides a debugging tool that displays contact points and normal vectors during collisions. It would be really helpful if developers could access this information programmatically from their scripts.
16 Likes

Totally agree. Such a feature would greatly help working with Roblox physics. I hope Roblox pays attention.

3 Likes

This would make mechanics like rail grinding, wall running and other mechanics that involve just a surface way easier to create, W post :fire::fire:

@Ameize4 Also is that a game or is that just some testing place?

2 Likes

It’s a test place for now. I’m reproducing a movement guide I once did for unity by catlikecoding
I’m doing this to get a better understanding of how such systems work. But it would be cool for myself to have this skill for future projects

1 Like

Currently impossible to do great physics collision systems such as sounds and spawning particles at contact points for something like a metal part scraping against another metal part.

Please consider this, the physics engine needs to be opened up more.
As someone said, its already implemented and gets rendered on the client.
This would also let us refine ridged body controllers.