I have a family of objects (with solid, platform and sine behaviors) that can move left/right and turn on collision with walls or other objects in the same family. In addition to moving horizontally, they can also move vertically up and down with sine behavior at the same time. Essentially, I'm trying to create boxes overlapping water moving left&right (and up&down by sine movement to simulate waves).
This works well, but I'd like to be able to stack other boxes in the same family on top of these moving boxes (and have them move with the moving object). If I set the solid behavior on the stacked box to disabled, it follows the moving box as intended and the turning (on collision with wall) for moving box works. However, if I keep solid for stacked box enabled, the stacked box will follow the moving box until collision with a wall, but then prevents the moving box from changing direction/moving back as it normally would. This occurs even when the vertical sine movement is disabled altogether. Also, for my game I need to keep solid enabled for both boxes as I don't want my characters going through them.
How could I make the stacked box follow the horizontal/vertical movement of the box it's standing on (in the same family) ? Thanks for any help!