Angle Jumping

0 favourites
  • 9 posts
From the Asset Store
Candy Jumping
$2 USD
60% off
Jump on candies, collect candies and earn score!!!
  • So im trying to make my character have different jumping behaviors depending on weather she's standing still or running. When she's standing still, she jumps straight up and fall straight down, but when she's running, i'm trying to have her jump in a pre-determined arc that is not effected by the platform movement, ie. regardless of the keys pressed mid-air, as long as she is running (or if running/idle to running animation is playing) and the jump button is pressed, she will always jump in an arc, same distance, same speed, same everything. I've been messing around with the "move at angle" and "set angle for gravity" actions, but these just have me teleporting me all over the place so clearly I have no idea how these actions works. If anyone can help, it'd be much appreciated. Capx link is below

    dropbox.com/s/lyr8fkwro5sl7hq/JumpingProblems.capx

  • I had a look and I'm not sure what you mean by jump in an arc. If it's a different animation can't you just play it when that type of jumping is happening?

  • I had a look and I'm not sure what you mean by jump in an arc. If it's a different animation can't you just play it when that type of jumping is happening?

    Here is an image of what I?m trying to do movement wise, specifically the flat jump is what im aiming for.

    imageshack.us/a/img716/5922/nybitmappsbildz.png

    And I do have a separate animation for that specific jump, in the capx it?s labeled Runjump. But what I?m trying to do is have the running jump move in a specific pattern. Unlike a normal jump which is affected by things like momentum, gravity, running speed, etc, I need the running jump to move in the arc pattern everytime, unaffected running speed, gravity, etc.

  • You can set up the character's gravity, acceleration, deceleration etc when you do that type of jump.

  • okay, so messing with jump strength and gravity, i can get my character to jump in a high arc, like the high jump in the picture. but Im trying to get her to do something more akin to the flat jump. The way I see it, there are two ways to go about it.

    1. I need to program something similar to a sudden increase in forward momentum right before each running jump. The easy way to do this would be to have the character have a fast running speed, but I like my characters current speed and it isn't super fast. the whole point of the fast arc jump is for it to be faster than running speed. Maybe i can add a separate set of platform behavior that is only active when the character is running, or something like that.

    2. As far as I know, the default jump angle is 90 degrees, so I need to alter that angle. But there is no "Jump angle" action, maybe the "angle of gravity" action will come in useful here, i'll try it out and let you know what happens.

  • You can use platform.vectorx and platform.vectory to control the jump's x (distance) and y (height) directions.

    Is that what you're looking for?

  • Yeah, control the vectorY and vectorY while the animation is playing, (even per specific frame if you want). Don't think if it as angles, think of it as horizontal movement speed VS vertical movement speed.

    You might also need to set the platform behavior to ignore player input durring the jump so the player can't interfere with the vectorX and VectorY.

    Best of luck,

    Mike

  • Ill give the vector idea a shot, thanks guys!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • LittleStain

    K I tried to make the vectors work, but I must be missing something on how vector values operate because altering the vector Y from 5000 to -5000 value didn't seem to do much and altering the vector x value just nudges me to the right slightly, even if I jump to the left I still get nudged to the right.

    So I tried something else, I altered the max speed and acceleration for running jumps, and made sure that those values get reseted every time I land. The result is something close to what I was aiming for, but not the predetermined arc jump I originally aiming for. Since you two seem to know how vectors work, I'm gonna leave my most recent capx in this post, and if you have a moment, please alter it so I know how to properly use the vector x and y actions.

    dropbox.com/s/tjlomdhiujdvm6u/Jumpingproblemspersist.capx

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)