Lua 中怎样才能使用box2d cocos2dx v2.2.5

TestLua 中未找到 实例代码(不是TestCpp哦,亲)

http://discuss.cocos2d-x.org/t/use-box2d-in-lua/628/4
貌似可以用,我2.2.5.目前未发现异常

cocos2d-x 的box2d没有导出lua的接口, 我建议你去看看quick-cocos2d-x 的物理引擎的使用, 它用的是chipmunk.
这个目录下应该能帮到你quick-cocos2d-x-2.2.5\lib\cocos2d-x\external\chipmunk\cocos2dx_support

搜了一个接口
依然感谢

哥们我现在也在用,lua 咋使用box2d

是2.2.5版本么?3.x的lua支持

搜了一个接口
依然感谢
回复的时候忘记点了

如果是2.2.5你就看下我楼上发的那个地址,有解决方案

Include LuaBox2D.cpp and LuaBox2D.h in your project. LuaBox2D.h is missing an include, be sure to #include “tolua++.h” there.

Register the lua box2D extension by editing your Appdelegate.cpp file.

Add the include: #include “LuaBox2D.h”
Add the following to the bottom of the AppDelegate::applicationDidFinishLaunching() function: tolua_LuaBox2D_open(pEngine->getLuaState());

https://www.evernote.com/l/AFJZN_jauvFKbaEFdp99PytXJns9d8Saev0

1赞