Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by MatthewM

I noticed some strange behavior when using 1-way platforms in my scrolling platform game.

-- When applying accel.x to my objects they seemed 'stuck'.
-- I also noticed that I was (generally) unable to jump when on the 1-way platform.

Both work fine on a normal solid.

I did some debugging and noticed that the vel.y for my player was generally not 0 when it was standing on the platform. The value ranged between -0.10 and -0.15 or so. In the case of 'jump' not working, it was because I was checking Entity.standing, but this value was false because of the minute downward motion.

I worked around it by allowing Entity.standing to be true for Entity.vel.y < -1.

I'm not sure if this is a bug or if I'm doing something wrong, but I thought I would ask. Thanks!

Using Impact 1.22.

1 decade ago by Joncom

You&039;re doing it right. The thing with #.standing is that it is set, I believe, only by the environment. If you are standing on top of a moving platform entity, or any entity for that matter, it will always remain false.

You have to check for those cases yourself.

1 decade ago by MatthewM

Thanks, Joncom. Perhaps I'm misunderstanding the situation, but I'm using the one-way platform tile that's part of the Impact collision layer. To the best of my understanding, this isn't an entity but rather a collision tile that handles x,y axis collisions differently and is stationary.

What I found strange is that when my entity is standing on it, the object still shows slight downward velocity. I could only detect this via debugging -- it's not visually apparent, but the behavior of my entity was definitely different on the one-way platforms.
Page 1 of 1
« first « previous next › last »