LibGDX 3D碰撞检测

时间:2014-10-09 09:01:26

标签: 3d libgdx collision-detection

我正在使用LibGDX游戏引擎为物理创建2D游戏和box2d。如何检查碰撞?对于3D游戏,有没有像box2d那样的?

1 个答案:

答案 0 :(得分:3)

  

有没有类似于3D游戏的box2d?

呀。 libgdx中有一个名为Bullet的3d物理引擎。用C C ++编写,它使用wrapper来与java进行通信。

要将其添加到项目中,必须将其添加到项目根目录中的gradle.build文件中:

核心依赖关系:

compile "com.badlogicgames.gdx:gdx-bullet:$gdxVersion"

桌面相关性:

compile "com.badlogicgames.gdx:gdx-bullet-platform:$gdxVersion:natives-desktop"

Android依赖关系:

compile "com.badlogicgames.gdx:gdx-bullet:$gdxVersion"
natives "com.badlogicgames.gdx:gdx-bullet-platform:$gdxVersion:natives-armeabi"
natives "com.badlogicgames.gdx:gdx-bullet-platform:$gdxVersion:natives-armeabi-v7a"
natives "com.badlogicgames.gdx:gdx-bullet-platform:$gdxVersion:natives-x86"

iOS依赖关系:

compile "com.badlogicgames.gdx:gdx-bullet:$gdxVersion"
natives "com.badlogicgames.gdx:gdx-bullet-platform:$gdxVersion:natives-ios"

HTML依赖关系:不兼容!

如何用它创建游戏是一个非常广泛的问题。看看这个:

Libgdx Bullet Physics