Top Down Jump - The Grasshopper

Attached Files

The following files have been attached to this tutorial:

.capx

grasshopper-example.capx

Download now 186 KB

Stats

801 visits, 1,100 views

Translations

This tutorial hasn't been translated.

Tools

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 KB
  • 0 Comments

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