Interconnected flying nodes
This project began as an attempt at recreating the cobweb behaviour in the game "World of Goo", and the current result is pretty interesting.
We start out with a grid of nodes. When pressing on one of the nodes it becomes the "center" node, and all surrounding nodes "point" to it. (If you look closely you can see small arrows on each node).
Depending on the position of the selected node, each node is assigned the destination position it needs to aspire to. For instance, the node directly above the selected node must now always aspire to be - directly above the selected node.
All nodes move towards their designated position with an easing factor, which creates the smooth animation.
Finally, lines are drawn using a drawing API between the nodes on every frame.
The result can serve as a good bases for the simulating the behaviour of flags in the wind, waves, or even schools of fish...
Pretty cool huh?
Source Code can be found at:
תגובות
הוסף רשומת תגובה