• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

[Trigger] Flying Height Issue

Status
Not open for further replies.
Hey guys :) I have an issue regarding calculation of flying height for my jump system.
So, it is supposed to ignore the terrain and move independently, maintaining the original parabola. It looks like this (it is not in Trigger tag for better overview):

( StartingCliffHeight - CurrentCliffHeight ) + (CurrentHeight + PeriodicalHeightIncreasement)


Starting Cliff Height - the height of the terrain where the jump began.
Current Cliff Height - the height of the terrain where the jumper is now.
Current Height - current height of the jumper (doesn't use current flying height).
Periodical Height Increasement - value that reduces with every repeat of the trigger, and an be negative, so it is crucial for the parabola.

I can't seem to find the problem. Any ideas?
 
Here:
(Start - currentcliff) + periodical

I would do Parabola function.

The one of yours is right.

My explanation wasn't the best :/
Periodical starts from 5 and is reduced by 0.4 every 0.03 seconds. It looks more realistic, because not only the velocity changes, but also the acceleration.

Your function would make him start at the height of 5 and fall almost in an instant :(

Anyway, what is the Parabola function?
 
My system is in the Movement trigger, in the Else part of the biggest If-Then-Else function. A part of it is in the Jump F4 trigger.

Use arrow keys to move and F4 to jump. If you press F4 while in the air, you will perform a backflip and you will be able to change direction once, if you are pressing different arrow keys. You can use F3 to increase movement speed and slow falling speed.
 

Attachments

  • werewolf.w3x
    4.1 MB · Views: 31
Status
Not open for further replies.
Top