Bug Fixing & Polish

Once I wired up:

        stateMachine.CharacterController.enabled = false;
        stateMachine.transform.position = _closestPoint - (stateMachine.LedgeDetector.transform.position - stateMachine.transform.position);
        stateMachine.CharacterController.enabled = true;

Then the player has a great distance to the roof, but is about a foot above the edge of the roof now. If I remove it, then the hands are lined up, but have a space between the roof and the hands. Is that because my collider transforms are weird?

It’s quite possible. Once you’re hanging there, try pausing the game and looking at the difference between the hands and the ledge detector (at this point, tledge detector should be aligned with the ledge). In the Editor, change thNote the position of the character, and then move the character so that the hands are properly aligned, and write down that position.
The difference between the 2 vectors will need to be subtracted (maybe added) to the ledge detector.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms