Hello, friends,
I am attempting to put together a game with a “Space Taxi” mechanic of landing and taking off on surfaces. Here’s my dilemma: I can get the ship to land, but not to take off.
I got it to land well enough by activating platform behavior on the ship and the platform when the ship contacts the platform: no problem there. The problem comes when I try to liftoff the ship. I set up a routine where the platform behavior is supposed to deactivate when I press the “Up” key. But either it will not deactivate, or the ship simply “falls through” the platform instead of taking off. So I can land, but not take off.
I’m open to any suggestions or references to other threads where this has been dealt with. Thank you very much!
J. Dean
Hello, I have almost no experience with platformers but it sounds like you don’t have a mechanic for the taxi to be in the air. Just removing its platform behaviour doesn’t give it abilities to float off into the air. I assume you have the taxi up in the air at beginning of scene and because it’s a platform character, it falls and ‘lands’ on a platform.
If you want to keep things simple, you could try this: don’t disable any platform behaviours, instead use them more. You could have the jump height whatever it needs to be for the taxi to get to the right height. Then you’d have a hidden platform at that height set to jump through. The taxi would ‘land’ on the hidden platform and appear to be driving through the sky.
Hello! Aldebaran Studio here!
I just made a video doing exactly what you asked. it explains how to make a spaceship fly, land, and be controlled while in the air.
Link: Spaceship GDevelop tutorial
That was fantastic!!! Thank you very much!!!