A Unity ID allows you to buy and/or subscribe to Unity products and services, shop in the Asset Store and participate
in the Unity community.
Discussion in 'Project Tiny' started by Sladzio, Mar 17, 2019.
Hey! Is there a way to retrieve a contact point of the collision between two BoxCollider2D?
Add BoxCollider & Rigidbody2D to both entities. Done
This part I know. I am searching for a function which could retrieve the point (Vector3) of the collision.
Thats my best bet, but im not sure if any of those actually store the data of where they contacted. If you can figure it out please let us know
These unfortunately return only array of entities. I have seen that hitbox2dservice contains a method for getting detailed info about overlapping but I can't get it to work. It returns values near Vector (0,0).Another option could be to use raycasting but I wanted particularly to use CircleCollider.
This is what you need ut.HitBox2D.HitBox2DService.detailedOverlapInformation(), this will basically return you vertices of a polygon made out from the intersection. Polygon would be a particular case once they are intersecting, thus making more than 1 contact point.
The contact point between 2 Circle collider or 2 Box collider?
I have one object which has a circle collider and the other object has a box collider. When they collide I need to retrieve the contact point. Maybe I will try one more time with the hotbox2d but the problem there is that there isn't any circle hit box