x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

How can I make my character move up a ladder?

Hello everyone,

I am making a simple 2D platformer and want to implement ladders to allow my character to reach places that are too high to jump to. But it seems impossible to make my character move anywhere along the z-axis unless it's jumping. I've made sure the character is not constrained to a plane.

I'm trying to use a SetActorLocation node to make the character's z-location change by 5.0 when the player holds down the climb button. But nothing happens when the button is pressed. To test it, I tried adding 2.0 to the x-axis, and that worked, but the character still wouldn't move up. I also tried setting the gravity to 0, but that didn't work either (character floated, but still wouldn't move up).

So far, the only possibility I've managed to find is to switch the character's movement mode to flying. That makes it possible to move up, but then switching back to regular movement becomes an issue. Because my climb functionality is coming of the up input axis event, I could switch it to either flying or walking based on whether or not the character is next to a ladder. But when the character goes back to walking, they are stuck forever walking, so they can no longer jump or fall.

I've attached a screenshot to show you what I mean. How can I make my character move up and down? Any help would be greatly appreciated.

alt text

Product Version: UE 4.9
Tags:
more ▼

asked Nov 12 '15 at 04:28 AM in Blueprint Scripting

avatar image

Rhiannonnee
18 7 12 15

avatar image alperenakyuz Nov 12 '15 at 08:23 AM

Try setting gravity scale to zero while climbing instead of changing the walking mode.

avatar image Rhiannonnee Nov 12 '15 at 08:29 AM

Hi alperenkuz,

Setting gravity to 0 is actually one of the things I'd already tried. My character still wouldn't move up regardless of the value of gravity. Do you have any other ideas?

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question