Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jump down through platform in "PlatformerObject" #1339

Closed
CustomLenny opened this issue Dec 28, 2019 · 7 comments
Closed

Jump down through platform in "PlatformerObject" #1339

CustomLenny opened this issue Dec 28, 2019 · 7 comments

Comments

@CustomLenny
Copy link

CustomLenny commented Dec 28, 2019

Description

There is no way to trigger (even through javascript as far as I could tell) the platformer characters to be in a force falling state.
I couldn't find any way to shift a character below the platform and have him fall.
The down arrow when set to sidescrolling is not used for anything besides going down a ladder.
When on a "jumpthrough" platform the down arrow should be able to let the character drop through the platform.
Jump down is sometimes done by holding the down and then pressing the jump, but it doesn't need to be that way as anybody who would like it that way can easily do that through the editor, in addition to that that would be a bad way for mobile devices.

Solution suggested

Down arrow on a platformerobject set to sidescroller lets player fall through the jumpthrough platform.

Alternatives considered

Javascript ways to set the isfalling and isjumping and any other flags by force.

@CustomLenny CustomLenny changed the title Jump down through platform in "PlatformerObject Jump down through platform in "PlatformerObject" Dec 28, 2019
@4ian
Copy link
Owner

4ian commented Dec 28, 2019

I've added a card for this on the roadmap: https://trello.com/c/jFSuWrm6/391-allow-platformer-objects-to-fall-from-a-jumpthru-platform-when-a-specific-key-is-pressed
I'll close the issue as it's a feature request but discussion can continue here.

Have you tried to change the Y position of the object to add 1 pixel? In theory that should put the object below the jumpthru and have it fall.

@CustomLenny
Copy link
Author

Have you tried to change the Y position of the object to add 1 pixel? In theory that should put the object below the jumpthru and have it fall.

Yes I have (and more than 1 as well), the flag for is on ground or is falling does not flip though so when moved down it still thinks it hasn't left the ground.

@4ian
Copy link
Owner

4ian commented Dec 28, 2019

An alternative could be to temporarily disable the jumpthru "platform" behavior for a few frames, letting the time for the platformer object to fall (one frame in theory should be enough) - but with the downside that other platformer objects on the platform will fall too.

I've checked the code and yeah seems that if I don't add something to force the "on floor" flag to be false, the object will try to stick to the floor as long as it's nearby.

@CustomLenny
Copy link
Author

An alternative could be to temporarily disable the jumpthru "platform" behavior for a few frames, letting the time for the platformer object to fall (one frame in theory should be enough) - but with the downside that other platformer objects on the platform will fall too.

Yeah I have more than 1 platformer character.
Which the idea of adding a fall through will surely be of use to any items that are using platform character as well.

I've checked the code and yeah seems that if I don't add something to force the "on floor" flag to be false, the object will try to stick to the floor as long as it's nearby.

I read through the code a bit and was trying to change the flags with javascript in gdevelop, this is despite the fact that I also saw that the bindings didn't exist to those functions anyway :P

@4ian
Copy link
Owner

4ian commented Dec 28, 2019 via email

@CustomLenny
Copy link
Author

Thinking more on this. Maybe there should be an option to pass through solid platforms as well.
If one wants to make the death a commander keen/monster bash/mario effect (the character gets thrown in the air and then passes through the bottom floor to disappear off screen, there's not really any way to do that either.

@4ian
Copy link
Owner

4ian commented Jan 26, 2020

For this case I would recommend to deactivate the platformer behavior and manually animate the object with forces. It's something that "break the physics" of the platformer engine (an object going through something that is supposed to be solid), so better completely disable it for your object at this moment :)

@4ian 4ian closed this as completed Feb 21, 2021
Repository owner locked and limited conversation to collaborators Feb 21, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Projects
None yet
Development

No branches or pull requests

2 participants