my character is not climbing the ladder
Hi,
Have you already rewatched the video at least one more time? Have you already compared your code to the Lecture Project Changes which can be found in the Resources of this lecture? Are there any error messages in your console? Have you already tried to add Debug.Logs to your code to see what is going on during runtime?
Hopefully, this helped you find the problem. If not, please share more information on what you did and have in Unity.
See also:
- Forum User Guides : How to mark a topic as solved
You might have selected the wrong âIs Triggerâ. You want to select the one in the Tilemap Collider 2D. Thereâs another one in the Composite Collider 2D, which is a bit deceiving, so you might have checked that one by mistake instead.
No, I believe thatâs not the case here. I have mine enabled and it works just fine.
Also, what Rick doesnât mention (maybe he will in latter lessons) is that he never checked the âUsed By Compositeâ box. Otherwise, why add it in the first place, if we wonât use it, right?
I myself had this problem as @isha_89, and the answer was simple. In my case, that is.
I rushed with typing my code and made a mistake. So I had this:
Vector2 climbVelocity = new Vector2(playerRb2d.velocity.x, playerRb2d.velocity.y * climbSpeed);
âŚinstead of this:
Vector2 climbVelocity = new Vector2(playerRb2d.velocity.x, moveInput.y * climbSpeed);
Hope that helps anyone!
It works for you because you thought of ticking the âused by composite boxâ if not, you could check the âIs Triggerâ box on the Composite Collider 2D and nothing would happen.
In that particular case, checing the Is Trigger on the Tilemap Collider 2D would solve the issue.
But of course here the best thing to do is to tick the boxes as on your picture!
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.