Create a surface of water (liquid) using the Sprite Kit

How to create a water surface using the Sprite kit ?

I searched and found help for Cocos2d , which uses box2d to create physical effects for water, like an object floating above water, and part of it in water and others outside the water. Objects descend through the water with the force used to throw it into the water and similar effects.

So, how can I achieve the same water effect with a set of sprites ? Any ideas

+4
source share
1 answer

A class SKPhysicsBodyhas properties called linearDampingand angularDampingthat you can modify to simulate fluid friction (fluid resistance) for objects thrown into water. You can read them in the SKPhysicsBody class reference .

+6
source

Source: https://habr.com/ru/post/1524506/


All Articles