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"

realistic jump

when I started playing with the third person template, I just found the default jump to floaty, so my idea is to count the time the character jumps or fall from 2m plataform (should be 0.6385 s), after some math I figured out that with a initial velocity of 4.2944 m/s it would take 0.187027 sec to fall from a plataform at1m height. this way I can compare the ue4 values to the kinematic equations values, and see if the gravity is really 9.81 m/s^2 in ue4.

so I made this blue print to see the time it takes to fall down or jump inside the game

alt text

also the custom function "MyPrintTime" is this one:

alt text

seems to work fine:

alt text

so I started running tests over the 2m plataform

alt text

some of the results were 0.586685,0.591385, 0.5847 that to my surprise were not consistant, but fluctuate around 0.58, if we calculate with the kinematic equation sqrt(2*h/g) we get a value of 0.6385s which is not that far away, then if we check out the initial velocity of the jump, which is called Jump Z Velocity in the game, with a value of 420 (default value), would lead to a jump of .9482m which is HUUUGE,

then I looked for some reference and found this: https://www.youtube.com/watch?v=tn0lqMuGguw

after all this I got 3 conclusions

1) someone jumping .9482m means he or she are monsters, a normal human jump should be about .6m of height that leads to an initial velocity of 3.431 m/s, but inside ue4 a 0.5m jumps needs a 360 cm/s initial velocity

2)over all the jump works fine, it looks odd because in reality very few ppl achive that jump hight plus the animationts dosent help either

3) the jump Z velocity is given in cm/s unlike the m/s that we normally calculate in a tipycal problem of free falling at school

Product Version: UE 4.22
Tags:
time-jump.jpg (216.6 kB)
my-funtion.jpg (236.3 kB)
jump.jpg (119.4 kB)
overblock.png (695.0 kB)
more ▼

asked Jul 12 '19 at 03:04 AM in Using UE4

avatar image

Mike090y9
11 1 4 3

avatar image Mike090y9 Jul 15 '19 at 03:14 AM

hope this wont cause any trouble, I tried to update this post but I cant add more images to the original question, so I will continue it as an answer, I made a function that let me print the velocity Z while jumping, the idea is to let the player jump only when we are inside a certain range of values of that velocity, that way if we are in a value near to 0, means that we are near the maximum height of the jump, that way making the double jump would need timing in order to succed

I made this custom function in order to check if the condition to jump via velocity Z is fullfiled: alt text

and implemented it in the jump itself: alt text

seem to work fine while we have a positive value near 0 in the velocity Z, but for some reason dosent work with the negative values that are near 0, even if they are inside the range that I set up, my guess is that there is a problem with the logic in the comparation made in the custom function "Can Jump (Check Velocity Z)" alt text

double-jump-bp.jpg (173.2 kB)
double-jump.png (855.0 kB)
(comments are locked)
10|2000 characters needed characters left
Viewable by all users

0 answers: sort voted first
Be the first one to answer this question
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