Hi all. Since my last post, my team has convinced me to switch to Unity3D from my own homebrew engine. So, I'm in the process of reimplementing some features that I had completed in my engine. Specifically, automatic doors and ladders. I'm using a pair of raycasts, one in either direction from the player center (at least, I think its from the player center) to detect appropriate "interactable" objects as follows:
Physics.Raycast(thisTransform.position, -Vector3.right, out hit, rayInteractableDistX, InteractableNonGroundMask) for left and
Physics.Raycast(thisTransform.position, -Vector3.right, out hit, rayInteractableDistX, InteractableNonGroundMask) for right
Where thisTransform is the player's transform. The problem I'm having is that these raycasts don't seem to work when the player overlaps the target object (ie: When the player is standing in the middle of the doorframe). Because one of the ways of exiting climb mode is to not be touching a climbable anymore, this is entirely preventing climbing from working, and seems to cause the door to close on the player as well.
What am I doing wrong?