Top Down Jump - The Grasshopper

1

Attached Files

The following files have been attached to this tutorial:

.capx

grasshopper-example.capx

Download now 186.19 KB

Stats

2,417 visits, 3,260 views

Tools

Translations

This tutorial hasn't been translated.

License

This tutorial is licensed under CC BY 4.0. Please refer to the license text if you wish to reuse, share or remix the content contained within this tutorial.

Published on 5 Mar, 2015. Last updated 19 Feb, 2019

Hey everyone! I made this capx example after a request from Anik on facebook. Anik wanted to know how to make his grasshopper jump from position to position. Turns out it's not too complicated... but not that easy either!

The principle is the following:

1. We use a timer to determine the grasshopper's jump's duration.

2. When the player touches a nenuphar, we store the starting and target position of the Grasshopper.

3. We do a linear interpolation between the start and target position to represent the grasshopper's movement on the ground.

4. We substract a value to the resulting Y position, using a periodic function, to simulate a jump!

Comments are available in the capx file. Made with C2 beta 197.

.CAPX

grasshopper-example.capx

Download now 186.19 KB
  • 0 Comments

Want to leave a comment? Login or Register an account!