[SOLVED] Port to Unity3D - Some Issues and Questions
Posted: Fri Jul 08, 2016 2:54 pm
I've compiled BEPUphysics v1.4.0 with Visual Studio Community 2015 for a use in Unity 3D 5.3.5f1. Therefor I changed the build settings of the projects BEPUphysics and BEPUutilities to use the target framework "Unity 3.5 .net Subset Base Class Libraries" and removed the conditional compilation symbol "WINDOWS" from the BEPUutilities project. Finally I changed the code in ParallelLoopWorker.cs (line 84) from "getToWork.Dispose();" to "getToWork.Close();".
I now even managed to create a small demo scene with two boxes, a rotating fan blade on a cylinder as in one of BEPU Physics' original demos and a working character controller. This made me feel euphoric. I really love the idea of having a dynamic character controller in Unity.
However, I noticed several things during my way of integrating BEPU Physics:
Kind regards
BrightBit
Edit: Are there some statistics about how fast BEPU Physics is in creating and updating its collision data in comparison to other libraries? PhysX for example seems to be slow when it comes to procedurally generated meshes.
I now even managed to create a small demo scene with two boxes, a rotating fan blade on a cylinder as in one of BEPU Physics' original demos and a working character controller. This made me feel euphoric. I really love the idea of having a dynamic character controller in Unity.
However, I noticed several things during my way of integrating BEPU Physics:
- The camera smoothing code in CharacterCameraControlScheme doesn't seem to work in Unity. The line "Character.Body.BufferedStates.InterpolatedStates.Position;" always returns the same position although the controller body is moving and BufferedStates.Enabled of my only space instance is set to TRUE. Am I doing something wrong?
- In contrast to PhysX the creation of a static mesh in BEPU Physics doesn't require normals or uv coordinates. How can I still retrieve them if I'm in need of those information during raycasts or collisions?
- Did someone test the character controller on curly stairs? That's something most other controllers (e.g. UFPS) that I've tested in Unity failed to solve properly. My first tests with BEPU Physics' controller on curly stairs seem promising but are still not good enough (some jitters but it might get better with camera smoothing).
Kind regards
BrightBit
Edit: Are there some statistics about how fast BEPU Physics is in creating and updating its collision data in comparison to other libraries? PhysX for example seems to be slow when it comes to procedurally generated meshes.