Search Feedback

36
votes

Physics2D.ComputePenetration

Physics

-

-

We need the 2D equivalent of the Physics.ComputePenetration method. Essentially the Physics2D.GetContacts() method with the additional origin and rotation parameters would do just fine. Currently you can only check for contacts from your Collider2D's current position which is frustratingly limiting.

This was added a couple of years ago to the 3D Physics but for some reason there isn't a corresponding method for 2D.
Reference:
https://feedback.unity3d.com/suggestions/expose-more-of-the-physx-api-namely-penetration-depth

This is absolutely essential in making custom character controllers which is why it was requested and added to Unity in the first place.
With this method you get all the data you need in order to resolve a collision.

Your opinion counts

Help us make things better. Share your great idea for improving Unity or vote for other people’s.

Log in to post a new idea

Categories

All

(10781)

2D

(281)

Ads

(55)

AI & Navigation

(82)

Analytics

(133)

Animation

(396)

Asset Store

(355)

Asset Store Publisher

(17)

Assets

(543)

Audio

(184)

Cloud Build

(145)

Collaborate

(64)

Docs & Tutorials

(240)

Editor

(2507)

Everyplay

(19)

Game Performance Reporting

(22)

General

(980)

Graphics

(870)

GUI

(432)

Input

(173)

Licensing

(92)

Networking

(189)

Physics

(384)

Platforms

(442)

Profiling & Optimization

(85)

Runtime

(182)

Scripting

(1168)

Terrain

(172)

WebGL

(143)