Skip to content

raymondlu/cocos2dx-explode-animation

 
 

Repository files navigation

cocos2dx-explode-animation

Simple object explosion/disassembly animation for cocos2d-x. Repo contains sample app. Example: cocos2d-x explosion animation

how to run sample app

osx - cocos run -p mac ios - cocos run -p ios android - cocos run -p android

how to use

	Vec3 crashVector(0,10,0);
	float duration = 10;
	float explosionPower = 1000;
	float gravity = 10000;
	
	auto explodeAnimation = util::Explosion::create(duration, crashVector, explosionPower, gravity);
	// run animation on your node
	node->runAction(explodeAnimation);

NOTE:

Your object needs to be already divided into pieces so it can be exploded. You can use blender to prepare your object.

Go into edit mode, and selection by mesh. Select one mesh and expand selection: cocos2d-x explosion animation Hit p to expande selection into separate object cocos2d-x explosion animation Divide whole your object. Export it to .obj or .fbx (end then to .c3b in order to load it to cocos).

About

Simple object explosion/disassembly animation for cocos2dx

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 86.1%
  • C++ 3.9%
  • Makefile 3.6%
  • Objective-C++ 3.5%
  • Csound Document 1.4%
  • Objective-C 0.7%
  • Other 0.8%