Unity3d Fork
Posted: Wed Jul 31, 2013 6:14 am
Hey all,
I just recently moved to Unity3d from XNA - and overall I've been really happy with the transition.... although I really miss BEPU.
Sure... Unity3d has PhysX, but the API is very limited compared to what BEPU has to offer, and you get much less control. My game will feature dynamic environments, and with BEPU I can do a lot of things that aren't possible with Unity+PhysX (multiple physics spaces, custom collidables, multithreading - not to mention all the great support Norbo gives on this board!!). I thought I might be able to get by with just PhysX, but it turns out a main bottleneck in my game right now is when I build new physics meshes during runtime- PhysX spends a ton of time baking the mesh. I recall BEPU was extremely fast on XNA for the same sorts of meshes (and I had some intense meshes I threw at it), so I feel now is the time to get BEPU integrated with Unity.
Since BEPUPhysics is dependency free, which is awesome, it basically works out of the box, so most of the work is creating replacement behaviors to interface with Unity3D. There's a few weird issues with Unity's (custom) implementation of Mono, especially in their WebPlayer - I had to turn off ALLOWUNSAFE, unfortunately, since the Mono runtime was having issues (mostly with casting). ALLOWUNSAFE works great in non-webplayer builds, though.
I have a quick and dirty demo up here: http://www.exocraftgame.com/build/bepu/Web.html, as well as a fork with the source code for the demo: https://bepuphysics.codeplex.com/Source ... raft/Unity
Not sure if there are any other Unity users lurking around, but hope this is helpful if you are... And thanks Norbo for making this incredible physics engine!
Cheers,
Bryan
I just recently moved to Unity3d from XNA - and overall I've been really happy with the transition.... although I really miss BEPU.
Sure... Unity3d has PhysX, but the API is very limited compared to what BEPU has to offer, and you get much less control. My game will feature dynamic environments, and with BEPU I can do a lot of things that aren't possible with Unity+PhysX (multiple physics spaces, custom collidables, multithreading - not to mention all the great support Norbo gives on this board!!). I thought I might be able to get by with just PhysX, but it turns out a main bottleneck in my game right now is when I build new physics meshes during runtime- PhysX spends a ton of time baking the mesh. I recall BEPU was extremely fast on XNA for the same sorts of meshes (and I had some intense meshes I threw at it), so I feel now is the time to get BEPU integrated with Unity.
Since BEPUPhysics is dependency free, which is awesome, it basically works out of the box, so most of the work is creating replacement behaviors to interface with Unity3D. There's a few weird issues with Unity's (custom) implementation of Mono, especially in their WebPlayer - I had to turn off ALLOWUNSAFE, unfortunately, since the Mono runtime was having issues (mostly with casting). ALLOWUNSAFE works great in non-webplayer builds, though.
I have a quick and dirty demo up here: http://www.exocraftgame.com/build/bepu/Web.html, as well as a fork with the source code for the demo: https://bepuphysics.codeplex.com/Source ... raft/Unity
Not sure if there are any other Unity users lurking around, but hope this is helpful if you are... And thanks Norbo for making this incredible physics engine!
Cheers,
Bryan