Moondust-Project
Moondust-Project copied to clipboard
[Engine] Solid NPC`s stacking issue
Sometimes, solid NPC`s, like SMBX tank pieces, fall trough each other. Test level: https://yadi.sk/d/e_4pdOQfotq32 This issue is quite volatile. Several runs of the test level maybe needed to reproduce this bug.
Still reproducible with latest laboratory build.
That I wasn't fixed yet because wasn't completely debugged speed-adding stack which requires a very interesting trick to correctly process physics:
- Instead instant applying of the speeds, collect pointers to items which must be applied
- Apply bottom speeds with strict order by height (from bottom to top), because lower items takes speed under, but upper items takes speed from bottom items, etc. Wired result may appear
Also, tank caterpillar must don't turn on impact blocks and other NPC's, and must don't turn in non-movable mode