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 igr

Hi! I have a strange problem which I cannot figure out. I have Hero and boxes entities in my game. When Hero stands on one box -- everything is OK. When I put two boxes on each other and Hero on top, the Hero offsets down. He also feels "uneasy" in a way :) trying to play the jump-animation. If I place three boxes on top of each other, then the third box offsets down and feels "uneasy" (tries to fall down). When I place four boxes on each other and Hero on top than the forth box and the Hero are OK with the right offset and staff. But the third box offsets down and "trembles" as if wanting to fall down.

I thought first it was due to the Hero size and offset properties, but I have the same problem when I remove offset for Hero and set the size property equal to sprite size. The boxes have size equal to sprite size and no offset.

Thank you!

1 decade ago by dominic

The physics in Impact are far from perfect. They are good enough to do the stuff you typically need for Jump'n'Runs and RPGs etc, but if you want to build something with physic puzzles you'll quickly get to the limits of the built-in physics.

That said, the entity size and offset really shouldn't make a difference, but you could try and experiment with the different collision modes.

If you want to do some more sophisticated physics stuff, have a look at the Box2d Stuff:
http://impactjs.com/documentation/physics-with-box2d

1 decade ago by igr

Thank you, Dominic, that explains it. Will try box2d.

1 decade ago by igr

Well, it was one more solution. The gravity factor (which I really did not need) caused the offset problem. Once removed everything became normal.
Page 1 of 1
« first « previous next › last »