0

are there any lua bindings for libbullet?

tried using swig and simply %includeing the BulletDynamicsCommon.h:

%module ybullet 
%{
  #include <btBulletDynamicsCommon.h>
%}
%include "%BULLET_inc_path%/btBulletDynamicsCommon.h"

but that doesn't work, as it also just includes other files, which is ignored by swig:

ybullet/helloWorld.lua:4: attempt to call field 'btDbvtBroadphase' (a nil value)

my lua file is ported from http://bulletphysics.org/mediawiki-1.5.8/index.php/Hello_World

nonchip
  • 1,084
  • 1
  • 18
  • 36

1 Answers1

0

found out a way using swig and a zsh script to automagically extract the %includes from the header files to get this: https://github.com/nonchip/YEngine/blob/master/ybullet/ybullet.i.tpl

nonchip
  • 1,084
  • 1
  • 18
  • 36