Best Object and Script for a Ladder?

So I’m new to scripting (and Unity, and game making for that matter). But, I’m working on a simple 2D side scroller game.

I’d like to put some ladders in the game to expand the game a bit.

What’s the best game object to use (I have a cube that’s in the shape of a really long rectangle)? And, how should the code read?

I’ve included this portion of code in my “PlayerMovement” script (Javascript).

if (OnLadder)
		{
			moveDirection = new Vector3(0, Input.GetAxis("Vertical"),0);
			moveDirection = transform.TransformDirection(moveDirection);
			moveDirection *= climbSpeed;
		}

I’ve got the “Is Trigger” set for the game object…

Any suggestions? Thanks!!

Are you factoring in Time.deltaTime anywhere? Perhaps elsewhere in the script where you actually apply the movement vector?

Also, are you sure you need the call to TransformDirection()? What is that intended to accomplish exactly?

Beyond that, what you have seems reasonable. Is it not working as you expect? Have you already added code to set the value of OnLadder appropriately?