I am doing a sort of hook, where whenever the hook collides with something, it retracts itself and pulls the the object it collided with back along with it.
But the objects the hook can collide with are not the same sizes, so I can't just create a fixed spawn point and assign that transform to the hooked game object, as some of them would clip the hook and others would be too far away.
So I need to find out what the offset should be, based on the size of the hooked game objects, but I don't know how to calculate it. Especially since the hook can also be rotated, so just offsetting on the y axis for example is not enough, since it might also need to be offset on the x-axis - Pic explaining it:
So any advice on how to calculate the offset (I have my bounds.size to use), and then apply it correctly on both the X and Y axis so the attached game object doesn't clip my hook?