Hello,
I have box collider A and box collider B. In addition, collider B contains a rigid-body. Their pivot point is located in a side of each collider.
I want to move collider B, and its corresponding rigid-body, to match the center of collider A. By doing the following:
colliderB.transform.position = colliderA.transform.position
I would match them by the pivot point. However, I would like to to the same by using the center of the colliders. In other worlds, can I move the center of collider B in such a way that it matches the center of the collider A, without having to modify the hierarchy and adding a parent for each gameObject? I know this would be a solution, but I find myself in a situation where modifying the hierarchy would not be possible.
Thank you!