hello I have a moving platform left to right. when the player is on the moving platform and the platform changes direction the player slides out of position?
example maybe hard to see player keeps moving position when platform changes direction
hello I have a moving platform left to right. when the player is on the moving platform and the platform changes direction the player slides out of position?
example maybe hard to see player keeps moving position when platform changes direction
Itās because the character behavior follows the platform with 1 frame delay.
It could be fixed by moving the code that do the following from doStepPreEvent to doStepPostEvent.
Iām not sure if there is an easy workaround.
This issue should be fixed in future releases of GDevelop. Thank you for reporting it.
Hi. Iāve solved that problem using events.
Please, take a look at the image attached.
In my code:
I still havent found a way to fix another glitch, with vertical moving platforms, in which thereās a one pixel gap between the Playerās feet and the platform when itās going down. The work around I found for that was simply adjusting the speed of the platform. If it isnāt too slow or too fast, the glitch doesnāt appear.
Hope it helps!
hi I recently tested the player sliding on moving platform with gdevelop version 5.1.159 and updated the rectangle movement extension but the issue is still happening.
Yes, the PR is still not merged into GDevelop. The submitted solution works but itās not clear if this is the right way to do it.
Iāve made some little adjustments to my code. Iām gonna post the updated version here soon.
Iāve tested it on different PCs and cell phones, and the sliding issue never appeared again. And apparently, it didnāt ācreateā new issues. Iām not sure if itās the most optimezed way to solve the problem, but Iāll be using this workaround for now. But it will be great if this problem is solved in future updates of the engine.
Iāve made a testing build of my game. Is it OK if I post the link for it here so you can see how the code works?
Iām asking because Iām new here, and I donāt know if there are any rules about posting links for the games we make.
Since itās related, why not. Although it will be a lot faster if you record a gif and post screenshots of the events aswell : D
Hi everyone.
Iām posting a new screenshot of the code (Iāve updated a few things) and a gif image showing what happens when the player stands on the moving platform. It no longer slides one pixel when the platform changes its direction.
Iām not sure if itās the most optimized way to use events to fix it, but thatās what Iāve got for now.
Hope it may be helpful.
Hi. Sorry, I know itās such an old topic, but I wonder if theyāre still working on a solution for this issue.
The workaround I made only works when the game runs at 60fps or near it. So it isnāt a real solution, I guess. It would be perfect if this could be fixed in the engine.
Take a look at this example to see how it handles parallax:
Thank you! Iām gonna take a look at that game. But the issue Iām talking about is the the topic of this post, the problem with the player āsliding when on a moving platformā. In a previous message you shared a link where we could see that they were trying to find a way to make the player follow the platform without the pixel gap. They even posted a video showing an example of the problem solved. Are they still trying to solve this problem?