Hi,
I'm wondering how I could use Bullet with C#/XNA. I'm kinda new to this whole thing (namely 3d programming), so I'm sorry if I say some wrong things. I'd like to use a true release version of bullet, so I'm not really considering BulletX. Looking online, I haven't found anything that would work.
Something I've been thinking about: since C# can call dlls, can I compile Bullet into a dll to use? If so, how would I go around doing it?
C#/XNA with Bullet
-
Erwin Coumans
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
Re: C#/XNA with Bullet
The new work-in-progress Bullet Physics Editor uses c# and C++/CLI .Net on Windows.
Check out http://bullet-physics-editor.googlecode.com
Thanks,
Erwin
Check out http://bullet-physics-editor.googlecode.com
Thanks,
Erwin
-
Test337
- Posts: 2
- Joined: Fri Mar 26, 2010 3:29 am
Re: C#/XNA with Bullet
So, I downloaded the zip with all, and I'm still confused how to use it.Erwin Coumans wrote:The new work-in-progress Bullet Physics Editor uses c# and C++/CLI .Net on Windows.
Check out http://bullet-physics-editor.googlecode.com
Thanks,
Erwin
I see a ManagedCpp.dll, so I added that to my XNA project. I also see that it has a class ExperimentalBulletWrapper. However, I don't see how I can use that at all. Can you help?
-
anthrax11
- Posts: 72
- Joined: Wed Feb 24, 2010 9:49 pm
Re: C#/XNA with Bullet
You can try this wrapper I'm working on:
http://code.google.com/p/bulletsharp/
There is no XNA sample code yet, only SlimDX, so maybe it's not so easy for you to get started with it, but on the whole it's a decent solution for physics on the .NET platform. The interface to Bullet is very similar to how you would use it in C++, just a bit simpler, so any C++ code for Bullet should be easy to port to C#.
There is also PhysX.Net if you don't mind stricter licensing:
http://physxdotnet.codeplex.com/
http://code.google.com/p/bulletsharp/
There is no XNA sample code yet, only SlimDX, so maybe it's not so easy for you to get started with it, but on the whole it's a decent solution for physics on the .NET platform. The interface to Bullet is very similar to how you would use it in C++, just a bit simpler, so any C++ code for Bullet should be easy to port to C#.
There is also PhysX.Net if you don't mind stricter licensing:
http://physxdotnet.codeplex.com/
-
ihar3d
- Posts: 25
- Joined: Wed Jan 23, 2008 11:28 am
Re: C#/XNA with Bullet
Note, that, unfortunately, c++\cli assembly compiled in mixed mode (native + managed) could not be used on XBOX360 if you are interested in this platform.
-
anthrax11
- Posts: 72
- Joined: Wed Feb 24, 2010 9:49 pm
Re: C#/XNA with Bullet
That's a good point. I added a note about it on the home page.ihar3d wrote:Note, that, unfortunately, c++\cli assembly compiled in mixed mode (native + managed) could not be used on XBOX360 if you are interested in this platform.