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"

Add Movement Input Unexpectedly adds rotation to Character Mesh

Hey There! I'm new to Unreal Engine. I'm trying to make a climbing system, I've succeeded in making the character go up and down on a large BSP box.

The problem is: When Going up some of the tower's faces, the character changes his orientation unexpectedly after adding z-axis movement with an AddMovementInput node (The last node). I've debugged the Blueprint, and removing this last node ends up in the character going up the z-axis after jumping, and staying at a fixed location in mid-air, with no orientation change. Since he turns, he falls, because I'm casting a ray to determine if he's still climbing

Here's a screenshot of the Blueprint and of working and failing scenarios on the climbable tower.

Blueprint:

alt text

Successful Climb:

alt text alt text alt text

Failed Climb on Another Tower's Face:

alt text

[UPDATE]

Climbing is triggered by jumping (hitting space), so what I normally do is I run against the face of the tower pressing w and then press space without letting w go. I tried just pressing space, and he starts climbing anda doesn't turn. He jsut turns when I hit the W key

Product Version: UE 4.19
Tags:
more ▼

asked Jul 17 '18 at 04:53 PM in Blueprint Scripting

avatar image

ANLevant
1 1 2

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

What happens if you add an isClimbing branch between you InputAxis MoveRight and its AddMovementInput node? Maybe it's turning because of that and we can stop it when climbing.

more ▼

answered Jul 17 '18 at 05:57 PM

avatar image

mightyenigma
3.8k 18 20 20

avatar image ANLevant Jul 17 '18 at 06:07 PM

Just tried. Still the same is happening :( I'll attach a picture of the modification I did to the Blueprint. And thank you very much for answering!!

alt text

avatar image ANLevant Jul 17 '18 at 06:13 PM

Just discovered something new: Climbing is triggered by jumping (hitting space), so what I normally do is I run against the face of the tower pressing w and then press space without letting w go. I tried just pressing space, and he starts climbing and doesn't turn. He just turns when I hit the W key

avatar image mightyenigma Jul 18 '18 at 09:22 PM

Does the character always rotate toward the same world direction when doing the unwanted rotation, or is it different every time on the same wall? Maybe one wall he is already facing toward some neutral direction but the others he isn't. I wonder what will happen if you use [X: ForwardVector X, Y: ForwardVector Y, Z: 1] into the Add Movement Input instead of just [x:0.y:0.z:1]. Maybe that will fix it? It's a wild guess. I have no idea. I have similar problems when I'm working on my spline-based movement setup.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
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