simulating a jump (with three key "y" points)

digitalzerodigitalzero Member, BASIC Posts: 639

okay i have somewhat asked this question before in the forum but the answer i got wasnt really exactly what i needed... okay... so im trying to simulate a jump... but i would like the jump to be at three points... three y points specifically but when it reaches these y points i want it to go to them with a nice curve... as opposed to going to them in a vertical line... what kinda math equation can i do this with and how can i make this happen... i have put in a picture as well to better explain what im talking about

Comments

  • digitalzerodigitalzero Member, BASIC Posts: 639

  • ArmellineArmelline Member, PRO Posts: 5,421

    So the actor floats when it reaches the end point? Or it's landing on something? Or?

  • digitalzerodigitalzero Member, BASIC Posts: 639

    i want it to be simulative of a jump without using acceleration and colliding to anything... but im totally okay with floating

  • digitalzerodigitalzero Member, BASIC Posts: 639

    @Armelline you see how Cutman jumps... this is something im trying to achieve without having gravity or anything

  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,881

    A couple of questions

    1) You don't want to use the accelerate behavior? (Its so easy with accelerate!)
    2) What is the x coordinates for the three positions?
    3) Will the three positions change or are they the same every jump? (Are you looking for a general formula? Or will the trajectory always be exactly the same?)

  • AlchimiaStudiosAlchimiaStudios Member Posts: 1,069

    I've got an interpolate jump project somewhere. I'll see if I can find it.

  • ArmellineArmelline Member, PRO Posts: 5,421

    What I mean is, is the end a platform or something? It makes no sense otherwise for the end point to be higher up than the start. If the player jumped on a flat surface, would the start and end height be the same?

  • SocksSocks London, UK.Member Posts: 12,822

    @digitalzero said:

    Place actor at x600, y50

    Interpolate x to 350 / Duration 2 / Function Linear
    Interpolate y to 250 / Duration 2 / Function Ease Out

    Rule: When x => 250
    --Interpolate x to 100 / Duration 2 / Function Linear
    --Interpolate y to 70 / Duration 2 / Function Ease In

  • AlchimiaStudiosAlchimiaStudios Member Posts: 1,069

    Don't know if this helps but here is the general idea with interpolate.

  • digitalzerodigitalzero Member, BASIC Posts: 639

    well the ending is not a platform i just would like general code... because i want it to be seamless and seem as if it is jumping around the screen but its for a cutscene... thanks so much you all for all the replies! ill try some of these puppies out

  • jay2dxjay2dx Member Posts: 611

    I posted a variable jump demo here, you could possible edit this for your needs by updating rules for the X axis

    http://forums.gamesalad.com/discussion/90742/variable-jump-for-a-platformer-heres-mine-share-yours#latest

  • digitalzerodigitalzero Member, BASIC Posts: 639

    Thanks so much!

Sign In or Register to comment.