I've kept a list of 'touching' entities (and where they are touching) on each entity before. Every frame this was cleared and rebuild as collision detection is performed.
The moving platform's update code will then move any entity that was touching it's top.
Having this list available was also handy for other gameplay too, so I'm a fan of this solution, even if it has some overhead.
The moving platform's update code will then move any entity that was touching it's top.
Having this list available was also handy for other gameplay too, so I'm a fan of this solution, even if it has some overhead.