It uses the "Nape" physics system. The Takos are made from small circular physics objects (named "nodes" in the source) that are connected with "WeldJoint"s acting as springs. See "PhysicsMeshSprite.hx" for the main part of this.
Nodes of the Takos that are close to the mouse are selected when you press the mouse button. Nodes that are selected are continuously accelerated towards the mouse. This is all done in "PlayState.hx" in the "grab()" and "updateHold()" methods.
← Return to game
Comments
Log in with itch.io to leave a comment.
I know that HaxeFlixel has a built-in collision system, so that accounts for pushing forces, but how did you do the pulling forces?
The source code is available if you would like to check it out:
https://github.com/lcapps-luke/Takogochi/tree/main/source
It uses the "Nape" physics system. The Takos are made from small circular physics objects (named "nodes" in the source) that are connected with "WeldJoint"s acting as springs. See "PhysicsMeshSprite.hx" for the main part of this.
Nodes of the Takos that are close to the mouse are selected when you press the mouse button. Nodes that are selected are continuously accelerated towards the mouse. This is all done in "PlayState.hx" in the "grab()" and "updateHold()" methods.
tako
Bouncyyyy XD