cocos2d-LUA 中怎么使用Physics3D物理引擎?

hecaiyi04 2017-12-02 11:33:38
参考cocos2d lua-tests 中的Physics3DTest例子,创建了3D精灵,并且设置了对应的Physics3DComponent;及rigidBody:setCollisionCallback(。。。。)碰撞的回调函数;
并且physics3DWorld:setDebugDrawEnable(true) 可以看到每个3d精灵 明明发生了碰撞,可是却没有进入setCollisionCallback设置的碰撞回调函数,请问一下,是不是还要设置什么地方?

我已经在VS2015预编译里面设置了CC_ENABLE_BULLET_INTEGRATION=1,没有用

请问cocos2d-lua中使用Physics3D物理引擎,需要在哪里设置一下吗 ?谢谢!
...全文
441 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
hecaiyi04 2017-12-03
  • 打赏
  • 举报
回复
有没有知道的啊,谢谢啊
Title: Cocos2d-x by Example: Beginner’s Guide, 2nd Edition Author: Roger Engelbert Length: 250 pages Edition: 1 Language: English Publisher: Packt Publishing Publication Date: 2015-04-30 ISBN-10: 1785288857 ISBN-13: 9781785288852 Unleash your inner creativity and learn how to build great cross-platform 2D games with the popular Cocos2d-x framework About This Book Build multi-device games, letting the framework do all the heavy lifting! Spruce up your games with easy-to-apply animations, particle effects, and physics simulation Quickly implement and test your own game play ideas, with an eye for optimization and portability Who This Book Is For If you are a game enthusiast who would like to develop and publish your own game ideas onto different app stores, this is the book for you. Some knowledge of C++ or Java is helpful but not necessary. In Detail Upgraded and updated, the powerful and popular open source framework Cocos2d-x is better than ever. Through step-by-step tutorials, you'll learn how to take complete advantage of the framework. You'll learn how to add animations and special effects, implement a physics engine, optimize your games, prepare a project for multiple devices, and develop game ideas from the test version to a finished project. Most importantly, this book provides you with the accumulated knowledge of thousands of game developers, all packed into one easy-to-use and proven framework that will save time and strenuous thinking! Table of Contents Chapter 1. Installing Cocos2d-x Chapter 2. You Plus C++ Plus Cocos2d-x Chapter 3. Your First Game – Air Hockey Chapter 4. Fun with Sprites – Sky Defense Chapter 5. On the Line – Rocket Through Chapter 6. Quick and Easy Sprite – Victorian Rush Hour Chapter 7. Adding the Looks – Victorian Rush Hour Chapter 8. Getting Physical – Box2D Chapter 9. On the Level – Eskimo Chapter 10. Introducing Lua!
Create compelling 2D games with Learn cocos2d 2:Game Development with iOS. This book shows you how to use the powerful new cocos2d, version 2 game engine to develop games for iPhone and iPad with tilemaps, virtual joypads, Game Center, and more. It teaches you: The process and best practices of mobile game development, including sprite batching, texture atlases, parallax scrolling, touch and accelerometer input. How to enhance your games using the Box2D and Chipmunk physics engines and other cocos2d-related tools and libraries. How to add UIKit views to cocos2d and how to add cocos2d to UIKit apps. The ins and outs of the Kobold2D development environment for cocos2d and its pre-configured libraries, including cocos3d and Lua. Best of all, this book will have you making games right from the very start. It guides you step-by-step through the creation of sample games. These fun examples are modeled after popular App Store games and teach you key concepts of the newcocos2d 2game engine and relevant tools like TexturePacker (texture atlas), PhysicsEditor (physics collision shapes), Particle Designer (particle effects), Glyph Designer (bitmap fonts), and others. This book offers a rock-solid introduction to creating games made entirely with cocos2d and little or no iOSSDK and OpenGL code. It also details alternative implementations, identifies the best free and commercial tools for cocos2d game development, features coverage of the author’s improved cocos2d game engine (Kobold2D), and even helps you enhance your game’s marketability on the App Store. What you’ll learn The process and best practices of mobile game development, including sprite batching, texture atlases, parallax scrolling, touch and accelerometer input. How to enhance your games using the Box2D and Chipmunk physics engines and other cocos2d-related tools and libraries. How to add UIKit views to cocos2d and how to add cocos2d to UIKit apps. The ins and outs of the Kobold2D development environment for cocos2d and its pre-configured libraries, including cocos3d and Lua. Who this book is for The book is aimed at beginning game developers looking for an easier and even more powerful way to create compelling 2D graphics using OpenGL and Objective-C. It is assumed that the reader will have some knowledge of object-oriented programming and the Apple and iPhone/iPad developer environment.
Create compelling 2D games with Learn cocos2d 2: Game Development with iOS. This book shows you how to use the powerful new cocos2d, version 2 game engine to develop games for iPhone and iPad with tilemaps, virtual joypads, Game Center, and more. It teaches you: The process and best practices of mobile game development, including sprite batching, texture atlases, parallax scrolling, touch and accelerometer input. How to enhance your games using the Box2D and Chipmunk physics engines and other cocos2d-related tools and libraries. How to add UIKit views to cocos2d and how to add cocos2d to UIKit apps. The ins and outs of the Kobold2D development environment for cocos2d and its pre-configured libraries, including cocos3d and Lua. Best of all, this book will have you making games right from the very start. It guides you step-by-step through the creation of sample games. These fun examples are modeled after popular App Store games and teach you key concepts of the new cocos2d 2 game engine and relevant tools like TexturePacker (texture atlas), PhysicsEditor (physics collision shapes), Particle Designer (particle effects), Glyph Designer (bitmap fonts), and others. This book offers a rock-solid introduction to creating games made entirely with cocos2d and little or no iOS SDK and OpenGL code. It also details alternative implementations, identifies the best free and commercial tools for cocos2d game development, features coverage of the author’s improved cocos2d game engine (Kobold2D), and even helps you enhance your game’s marketability on the App Store. What you’ll learn The process and best practices of mobile game development, including sprite batching, texture atlases, parallax scrolling, touch and accelerometer input. How to enhance your games using the Box2D and Chipmunk physics engines and other cocos2d-related tools and libraries. How to add UIKit views to cocos2d and how to add cocos2d to UIKit apps. The ins and outs of the Kobold2D development environment for cocos2d and its pre-configured libraries, including cocos3d and Lua.

721

社区成员

发帖
与我相关
我的任务
社区描述
Cocos2d-x相关内容讨论专区
社区管理员
  • Cocos2d-x
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧