One would expect horses and pigs to be affected by the levitation effect, whether they are being ridden or not. This doesn't seem to be the case.
Rideable animals go up as expected when alone. However, when the player gets on them, the levitation stops being effective and they fall back to the ground, until the effect runs out or the player dismounts. This is not the case for non-player entities riding the pig or horse.
Rideable mobs are very useful for map making, and I think it would be best to fix it. This would allow for slow falling mounts and all sorts of things.
EDIT: After some more testing, it seems this is not the case when you summon the horse or pig with levitation. Potions and the effect command seem to be a special case here.
EDIT 2, after testing in 16w42a: The bug is still standing, though it has changed for pigs. Pigs are now affected by levitation when the player rides them, but when the player starts holding a carrot on a stick, to control them, they fall back down to the ground. The horses are still the same.
Linked issues
Comments 4
I came here for this exact thing. Imagine fighting a shulker, plop down a boat or another rideable entity and just sit there while it pretend levitates you.
Its an easy way to avoid getting levitated.
Forward-resolving to MC-121788
I have also had this problem. Having levitation work while mobs are being ridden would give make map makers incredible advantages to make cool things for others. Please fix soon! ☺