Jump & Bounce Functions w/ Gravity Physics

This is an example of my gravity jump & bounce functions / formulas
The functions allow you to set unit, height, gravity, update speed, movement lock, animation, animation lock, and % energy lost during bounce parameters.

Gravity: The lower the # the faster the unit jumps up and falls down. Must be negative. Default is -9.8. Looks better at around -20 though.
Update Speed: This is the speed at which the unit's height is updated. The lower the # the faster it updates. It's usually good at 0.1 or 0.05.
Movement Lock: Locks the unit's movement while its jumping. Causing it to keep moving in one direction until it lands then it goes back to its initial orders. Makes the jump look more realistic.
Animation: The animation you want the unit to play while jumping.
Animation Lock: Locks the animation shortly after jumping.
% Energy Lost During Bounce: This changes the height of the bounces after the first one. Must be between 0 and 1.0. Default is 0.15

You can make your trigger "wait" for the function to complete by unchecking the "Create Thread" option in the function.

Feel free to use it however you want...




Comments

  • To post a comment, please or register a new account.
Posts Quoted:
Reply
Clear All Quotes

About This Project

  • Project ID
    24398
  • Created
    Jun 24, 2010
  • Last Released File
    Never
  • Total Downloads
    825
  • License

Categories

Members

Recent Files