How to know whether the two object parallel intersected or perpendicularly intersected ??
Hi there, check the below image. i have two objects either they intersect perpendicularly or parallel. i want to know in which direction they intersected thank you.
rot.png
(8.9 kB)
Comment
at that time i managed it some how.. like when it collied bool objectAPlaced_H = objectA.collieder.bounds.extends.x > bjectA.collieder.bounds.extends.y; bool objectBPlaced_H = objectB.collieder.bounds.extends.x > bjectB.collieder.bounds.extends.y;
now, if(objectAPlaced_H != objectBPlaced_H){ // perpendicular }else{ // parllel }
the code will work even if the object are rotated also. https://docs.unity3d.com/ScriptReference/Collider-bounds.html