floating objects on water.

Hello,

 

I’m trying to create a app which look like live wallpaper, similar to the one in below link.

https://play.google.com/store/apps/details?id=com.androidwasabi.livewallpaper.dandelion

 

Objectives: objects floating on water.

touching water should create water wave effects and objects around it should moveout.

 

Is there any pre existing sample code or a API’s to do  it??

 

Sudheer

I think you have to split this into two bits. The graphic effects and the movement of the objects.

The latter is probably quite straightforward ; if there is a touch point presumably you want things to move out from that point so you apply two perpendicular forces derived from the distance from the touch point and the angle to the touch point.

The graphic is a bit different ; your best bet may be to reproduce a pre-rendered animation of the water ‘splash’ and scale/speed it accordingly. Simulating it for real is non-trivial - one of the drivers (I understand) for the movie ‘Finding Nemo’ is that they got proper looking water effects (I think Monsters Inc had a lot to do with getting the hair right !)

I think you have to split this into two bits. The graphic effects and the movement of the objects.

The latter is probably quite straightforward ; if there is a touch point presumably you want things to move out from that point so you apply two perpendicular forces derived from the distance from the touch point and the angle to the touch point.

The graphic is a bit different ; your best bet may be to reproduce a pre-rendered animation of the water ‘splash’ and scale/speed it accordingly. Simulating it for real is non-trivial - one of the drivers (I understand) for the movie ‘Finding Nemo’ is that they got proper looking water effects (I think Monsters Inc had a lot to do with getting the hair right !)