Skip to content

teemukorh/VRope-x

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VRope-x

Cocos2d-x /c++ port of simple rope system for cocos2d using Verlet Integration.

The VRope-x was ported to Cocos2d-x (v2.0) by Creeng Ltd..

The port was made from VRope 0.4 made by Flightless, which was a modified version of the original implementation by patrickC. The Flightless version added a MIT license, which is also contained in this ported version.

Demo video

Usage

Create

// Create joint
b2RopeJoint* bodyAbodyBJoint = (b2RopeJoint*) world->CreateJoint(&jd); 

// Create batchnode and vrope for joint (can also be made between two bodies)
CCSpriteBatchNode* batch = dynamic_cast<CCSpriteBatchNode*> (getChildByTag(KTagRopeBatchNode));
VRope* verlet = new VRope(bodyAbodyBJoint, batch); 

Updating (called from update loop)

// Update the verlets in the game loop
verlet->update(dt);
verlet->updateSprites();

See more usage examples from the original authors pages.

About

VRope (verlet rope) port to cocos2d-x

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages