Currently I'm using it only for 3 leaves at a time, but I think you can use it for quite a lot of leaves as it doesn't cost that much.

The only slow function is the c_trace, but if it should be too slow for plenty of leaves you could take it out and do the ground detection slightly different.

If you use this code you will have to adjust the parameters to fit into you game as the code stands and falls with the values in w_speed_current.

Regards,
Pegamode.