Issue with max speed and anti-gravity

TheHooglerTheHoogler Member Posts: 102
edited November -1 in Working with GS (Mac)
Hello!

I have an anti-gravity game, and can't seem to find an answer to this one. I have simulated anti-gravity using accelerate on my "hero" (-50), and this is the game pace I want. I used max speed to cap its speed at 50, and it works fine. Unlike a normal gravity game, where the ground halts acceleration, I have to use this speed cap in order to stop my hero from accelerating beyond control. Now, I also have buttons that allow the user to "blow wind" either left or right. Currently, when a button is pressed, the "hero" is blown at an angle of either 45 or 135 degrees depending on direction (to simulate lateral upward movement). This movement also happens at a speed of 50 (due to max speed selection).

So my question is this... I want my lateral movements to be faster (maybe 100-150 acceleration?), but my gravity to be capped at 50. Any help is appreciated!

Comments

  • old_kipperold_kipper Member Posts: 1,420
    cap his vertical speed at 50 and his lateral at 150. This I think could be done with a constraints on each based on rules that only fire when the magnitude of the x or y speeds being greater than what you want. I have not done this so maybe someone with experience of this kind of thing would drop a correction or suggestion.

    kipper
  • TheHooglerTheHoogler Member Posts: 102
    This game is an experiment, and we're running everything minimally. If all goes well, it'll be roughly 20,000 pixels high. I considered using constrains, but want to avoid anything that'll further stress the engine. Thanks for the advice though!
Sign In or Register to comment.