Jump down through platform in "PlatformerObject" #2332
Replies: 7 comments 1 reply
-
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 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. |
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
-
Yeah I have more than 1 platformer character.
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 |
Beta Was this translation helpful? Give feedback.
-
I think the solution lies in adding a function that would set _isOnFloor to
false (I've not verified that it's enough, potentially other flags too).
+ a unit test for this and expose the function as an action.
(And port this to the C++ platformer engine if it works, even if not used
currently)
I'll see if I can find time for this
…On Sat, 28 Dec 2019, 11:39 Custom, ***@***.***> wrote:
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
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1339?email_source=notifications&email_token=AAJYRAVMPJ6DHDO6B4HAROTQ24UGPA5CNFSM4KAJLWQKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHYHA7Q#issuecomment-569405566>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJYRAQQFTTSOXJ2EQ3CSQLQ24UGPANCNFSM4KAJLWQA>
.
|
Beta Was this translation helpful? Give feedback.
-
Thinking more on this. Maybe there should be an option to pass through solid platforms as well. |
Beta Was this translation helpful? Give feedback.
-
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 :) |
Beta Was this translation helpful? Give feedback.
-
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.
Beta Was this translation helpful? Give feedback.
All reactions