• Advertisement
Sign in to follow this  

Physics and collision detection libraries for a 3D game in Cocos2D-X

This topic is 784 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am developing a cross-platform 3D FPS game using Cocos2D-X on Windows machine. I want to implement the physics for bullet projectiles and first person character controller. Also, I want to implement feature of collision detection between 3D game objects. I searched online for resources, but could not find any helpful resources. I found the game developers' blog discussing about use of Bullet Physics library in Cocos2D-X. While exploring Cocos2D-X framework, I found that classes from Bullet Physics library are present in the external folder of the Cocos2D-X framework. So, I think that Bullet physics library is in-built in Cocos2D-X.

 

I have the following questions:

 

1. Which libraries are best for Physics and Collision detection for a 3D game development in Cocos2D-X?

2. If Bullet Physics library is best solution, then how to use this library in the development of 3D game on Cocos2D-X?

 

I would appreciate any information and tutorial resources related to this topic. Thank you in advance.

Share this post


Link to post
Share on other sites
Advertisement

Hi @Octane_Test,

 

I've already used Bullet Physics with Cocos, its just matter of storing a pointer to the sprite in the physics body and updating the sprite with the physics body's transformation after the simulation step.

 

To make a long story short, Cocos3d was a plugin for 3d graphics created for Cocos2d, back in the days when the framework was just for Objective-C and the iOS and OS X platforms. When the framework was ported to C++ they also started porting the 3d library that now is built-in into the engine.

 

Here you can take a look at a hello world example that integrates Bullet into Cocos3d (Obj-C), maybe the API has changed in recent versions but it may help you get an idea on how to do it.

 

Regards.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement