Platformer Linear Velocity X speed vs. Y jump

SUMinteractiveSUMinteractive Member, PRO Posts: 49
edited April 2012 in Working with GS (Mac)
Here's what's happening.

I have an actor moving on Linear Velocity X of 300
When I modify the Linear Velocity Y to 400 @90 degrees, the actor jumps. It works great.

When I change the Linear Velocity X to 600
The actor is not jumping as high as previously.

When I change X to 1000
The actor hardly can get off the ground.

Is there something funky happening? Or do I need to increase the Velocity Y as the actor moves faster? This also is affecting my gravity (Acceleration downward @1000). The faster on the X the slower the actor will fall too.

Any insight would be greatly appreciated.

Comments

  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    You are basically changing the angle the actor is moving when you do that.

    for example velocity.x set at 100 and velocity y at 100 will cause your actor to move at a 45 degree angle. But say you bump the x to 200 then now your going to move around 30 degrees and if you revers them so you velocity.y is 200 and velocity.X is 100 your moving more like a 60 degree angle.

    A better way to do a jump is do Accelerate up (direction 90) at a speed of lets say 100. You can play with the speed but that will give your forward moving actor a bump straight up in the air.

    Hope that helps.

    Cheers
  • SUMinteractiveSUMinteractive Member, PRO Posts: 49
    accelerate, 90 degrees, at 1000 doesnt even get the actor off the ground.

    accelerate at 10,000 gets the actor off the ground but hardly. It seems that I need to exponentially multiply the jump value as the actor moves faster in the scene.

    I need to keep the same jump height weather the actor is moving at 0 sped or 1000 speed.
  • BrynjeBamsenBrynjeBamsen Member Posts: 188
    try using interpolate to move you actor upwards
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    If that kind of acceleration is not getting your actor to move up what kind of gravity or downward acceleration are you applying regularly or what kind of destiny do you have set on your actor. These are all variable you are going to have to adjust to get your desired effect.
  • SUMinteractiveSUMinteractive Member, PRO Posts: 49
    grav is accelerate down at 1000

    what do you mean what kind of destiny?
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    lol density.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • SUMinteractiveSUMinteractive Member, PRO Posts: 49
    lol duh...

    im pullin my hair out here and im like... destiny??? wth? lol

    actor is 500
  • SUMinteractiveSUMinteractive Member, PRO Posts: 49
    Here's what I did to solve this (mostly, if you are moving very slow you jump super high so i'll tinker with this a bit more).

    velocity x = 650 (top speed)
    velocity y (single jump) = velocity.x * velocity.x
    velocity y (double jump) = (velocity.x * velocity.x) *2
    Grav (accelerate downward) = 5* velocity.x

    Density = 100
    Frict = 10

    This get's the actor moving and jumping at a good height at max speed. Need to figure out how to keep the same height at slower speeds.
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    turn your density down and your gravity down and use accelerate. you are never gonna get anything consistent by using the velocities like that.
  • SUMinteractiveSUMinteractive Member, PRO Posts: 49
    density doesnt seem to do anything. ive almost got it though... lots of math... =/
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    Thats just the thing. you have something messed up or overly complex at the very least. there is no reason for complex math to be able to jump while moving.
  • SUMinteractiveSUMinteractive Member, PRO Posts: 49
    i'll set up a test case but at velocity X of 650. What velocity Y do i need to be able to jump?
Sign In or Register to comment.