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"

Making character go from flying to walking after hitting ground.

Hello everyone!

I am trying out a small prototype where I have character which can run around and jump. When the character then stays in the air for x seconds he starts flying, this all works well the problem I have is when he is supposed to land again. The character won't recognize that he is on the ground and just keeps being in fly-mode.

I have thought of a solution where I could cause a hit event when the character hits the ground which would force him into walk-mode but I was wondering if there were any other, potentially better, way of doing this.

Cheers!

Product Version: UE 4.10
Tags:
more ▼

asked Mar 30 '16 at 07:24 PM in C++ Programming

avatar image

Tim0ntel
32 3 4 8

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

2 answers: sort voted first

I'm experimenting with this at the moment, I'm thinking I'll do a line trace below the character and if there is ground about 100 units from their feet, then I will use a set movement mode node to make them in the jumping/falling movement mode. This way they will still have the ground-landing animation as they would when they jump.

more ▼

answered Aug 27 '16 at 06:35 PM

avatar image

Scarwoo
5 1 2 4

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

A line trace isn't necessary.

This should answer it for you. :)

https://docs.unrealengine.com/latest/INT/API/Runtime/Engine/GameFramework/ACharacter/OnLanded/index.html

Call this event and set the details of the function to do what you need them to. Good luck!

more ▼

answered Aug 28 '16 at 12:46 AM

avatar image

Mark James G
529 44 24 51

avatar image aNorthStar Feb 03 '18 at 06:15 PM

I've been looking at ways to do this... unfortunately the On Landed event will only fire when the character is in Falling mode (not when in Flying mode).

I know there are a few different ways to implement this... like with line traces and collisions... but is there a more elegant, native way using the Character Movement Component in BP or C++?

(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