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"

Character gets stuck when walking on ledges

Hello

Im working on a 2d platformer and lately i noticed that if i try to walk off a ledge, my character tends to get stuck on said ledge, landing on the same platform seems to fix this (as in if i do a small jump, land on the platform and then try moving off the ledge it works )

Here is a video that showcases the issue

Video Link

https://www.youtube.com/watch?v=voLOtzz_GoA&feature=youtu.be

I alredy have Can Walk Off Ledges as true on my character movement component, as well enabled the Flat Floor Box Checks but nothing seems to really help with this

Product Version: UE 4.16
Tags:
more ▼

asked Feb 04 '18 at 03:11 PM in Blueprint Scripting

avatar image

alvarofer0020
85 15 16 23

avatar image weberl Feb 04 '18 at 08:24 PM

From the video it is hard to tell. There is no blueprint visible. But i think it has something to do with your characters animation blueprint.

As soon as you character reaches the corner of the platform it blends the move forward animation out into the "falling animation" and only starts falling after the falling animation. This is just a visual perception. While this blend happens, the character seems to be stuck.

Anyway - the movement is unnatural. I would expect to see a parabolic flight path of your character dropping of the edge. But it goes full stop and then straight down.

Ho do you handle "falling down"? Something is odd here.

avatar image alvarofer0020 Feb 04 '18 at 09:49 PM

Hey, Thanks for the quick reply!. sorry. just to make it clearer my issue is happening on the 2nd play in editor try, If i start moving to the right, as soon the game begins and reach the edge of the platform then the character becomes stuck for a few seconds before finally dropping down ( it happens at 0:03, Im holding the movement key to the right but the character is still on the platform and not falling down even though theres no floor below him. If i had let go of the direction key in that moment he would had dropped down right away )

As for falling down, The only modification i have done to it is that, if the player movement mode is Falling and there is no input from the controller ( MoveRight is 0 ) then the player Velocity Y is set to 0 (Since i dont want any sort of momentum or acceleration while moving in the air and the player should remain still when there is no input applied )

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

1 answer: sort voted first

I ended up fixing the issue. by using the FindFloor function whatever the player is on the walking state and setting his movement mode to falling when it returns false ( which essentially is the case i had, the character was still on the walking movement mode but wasnt getting his physics movement mode set to falling for some reason )

more ▼

answered Feb 08 '18 at 11:07 PM

avatar image

alvarofer0020
85 15 16 23

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