G’day mates! First ever post here, let me know if I’m doing something wrong.
I’m working on the basis of a fighting game, but I can’t seem to figure out one crucial detail.
I want to have my characters jump forwards/backwards a certain distance, but can’t have them moving freely in the air (see image)
My suggestion (and this is slightly complicated) is to use sprite utils and set an angle every 400 ms or something to the point where you want to go then change the degree by one or two or something every second so it arks?
Ok. If you are using that block “Control (sprite) with buttons” you can set it to the speed 0,0 and it will prevent the player from controlling the sprite. In this way, you can stop movement in the air until the player sprite is “hitting wall [down]” and then give them control back. If you are using custom movement scripts, I don’t see why you can’t stop them from moving while they aren’t touching the ground, should be simple enough. If you are confused about gravity and the like, you can use the “acceleration y” attribute to give your sprites gravity, and then set their velocity Y and X to a certain value when they jump, which will make sure the jump is the same each time.
it is based off of radians instead of degrees, but I don’t know what direction 0 is sorry. I just wanted to let you know because when I used it I was very confused.
You know, instead of using velocity, you could just use a Bézier curve to imitate a jump. That would prevent the player from moving and would have the added benefit of giving you more control with how high the player jumps and where they land. I could make a kind of demo to demonstrate if you want.