As new developer that just checking this game engine you might think that Cocos2d-x doesn't support Box2d.
Well it does but the configuration is buried deep in the compiler configuration . why .. i have no idea.
But once you understand where to change you will have the support to Box2d right away .
AFTER compiling the project again .
- The example will be with Visual Studio 2013 , but its the same in Xcode And Eclipse
That is in the Preprocessor Definitions . - Once you load your new project in Visual Studio right click on you project name
then properties. - In the Popup window you see that is opened go to :
On the left :
Configuration Properties -> C/C++ -> Preprocessor (A)
Then on the right :
Preprocessor Definition -> click on the small arrow in the drop list and select "<Edit..>" (B) - Once you click on "<Edit..>" small popup window will be open and called:
"Preprocessor Definition"
On the upper Multiline Edit box
You need to set :
CC_ENABLE_CHIPMUNK_INTEGRATION=0
and now you need to add new Preprocessor Definition:
CC_ENABLE_BOX2D_INTEGRATION=1
it needs to be like in this image : - Now yo must compile the project again , so the new definition you just set will take effect.
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.