How do I use platform vector Y?

Get help using Construct 2

Post » Thu Apr 06, 2017 3:50 pm

Hi, I am using the function "set platform vector Y" to make my own jump system, but I have one question.

To jump, I use a custom sustain system with a timer, so when the jump button is down and timer is not over I apply a vector Y to the body to jump higher or not. The problem is that sometimes the body makes a great jump, I don't know why. I am using delta seconds on the vector, because is a continued action while the button is down.

Do I have to use the delta time or the use of vectors uses internally the delta time??

Edit:

my code is something like:

If(jump_key is down) -> apply vector Y (body.jumpstrength * body.jump_strength_bonus * dt)
B
6
S
2
Posts: 61
Reputation: 1,099

Post » Thu Apr 06, 2017 8:53 pm

VectorY is in pixels/seconds. Every where you see 'second' it is already dt corrected. Like every 3 seconds, also dt corrected.

&

Say you want to jump max twice in height ... then body.jump_strength_bonus cant be bigger then 2
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Thu Apr 06, 2017 9:05 pm

99Instances2Go wrote:VectorY is in pixels/seconds. Every where you see 'second' it is already dt corrected. Like every 3 seconds, also dt corrected.

&

Say you want to jump max twice in height ... then body.jump_strength_bonus cant be bigger then 2


Thaaaank you so much, so I deleted the dt from the formula. I was afraid that in some computers the player could not reach some points.

thanks :)
B
6
S
2
Posts: 61
Reputation: 1,099


Return to How do I....?

Who is online

Users browsing this forum: Coren8r and 30 guests