How to make a sprite sit on a moving sprite and travel with it. I have made the red box jump with impulse and when it falls on the black block down which is moving, the red box
You can remove the red block then add it as a child node to the moving block:
var redBlockPosition = childNodeWithName("redBlockName")?.position //find where red block is in self
var movingBlockPosition = childNodeWithName("movingBlockName")?.position //find where moveing block is in self
var redBlockPositionFromMovingBlock = CGPointMake(redBlockPosition.x + movingBlockPosition.x, redBlockPosition.y - movingBlockPosition.y) //find where red block is from moving block's origin
childNodeWithName("redBlockName")?.removeFromParent() //remove red block
redBlock.position = redBlockPositionFromMovingBlock //change redBlock's position
childNodeWithName("movingBlockName")?.addChild(redBlock) //add red block as a child node of moving block
Hope this helped and good luck.