Platforms not behaving as asked


#1

I’m new so don’t judge.

I’ve made one platformer character sprite and one platform below it, but every time I launch a preview, the sprite falls through the floor. I’ve double checked the z layer, I’ve double checked that they are listed as a platform and a platform character, but it still refuses to work.


#2

Few things to check:
Are they on the same layer (not just the same Z order)
Is it the normal platform character or the top down character? (Top down won’t work)

For anyone to help, you’ll need to show screenshots of your scene, your events, and your behaviors attached to each object.


#3

I moved them to the same layer and it still did it.

It’s a platform character.

Heres a screen recording of me showing how it keeps disappearing, my events list, and the z list: https://youtu.be/--UEd7dDt24


#4

Have you customized the hitboxes of either of them at all? Can you paste some images of your hitbox screens for the character and the platform?


#5

here’s what my platformer character’s hitbox screen looks like. The platform does not have a hitbox and it looks like it cannot be given one because the “edit hitboxes” button is missing. The only behavior given to the platform is the platform behavior. The platformer character’s behaviors are health, pathfinding, platformer object, and stay on screen.


#6

You say the floor keeps disappearing but I didn’t see the floor at all in the preview video? Did you try dragging your character closer to the floor on the scene?

Just an idea… it seems as if your character has 0 gravity and/or the world has 0 gravity so your character might not be “dropping” to the floor when you preview the scene.


#7

Character’s gravity is set to 100. Here’s what happens when I move my character closer to the floor.ezgif-5-0d4eea7ea15f


#8

Not sure why its doing that. Could try comparing your platform behavior and character behavior with the online platformer example here >
https://editor.gdevelop-app.com/?project=example://platformer
In that example check the “PlayerHitBox” object (this is the object with the actual platformer behavior, not the player sprite)…


#9

The floor should absolutely have a hitbox, unless you’re using a tiled sprite instead of a sprite?

If so, can you try making your floor with a sprite and seeing if it works? (Tiled Sprite works just fine in the test I did this morning, but I want to eliminate any causes of issues for you)