Allow disabling Havok floating origin world regions - #18750
Conversation
|
@BarthPaleologue what if you set the floatingOriginWorldRadius to infinity or to a number representing the size of your world? would that achieve the same behavior without adding additional flags ? |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
I agree with @georginahalpern . setting a very large physics world size should solve the issue. |
|
Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s). |
|
Snapshot stored with reference name: Test environment: To test a playground add it to the URL, for example: https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/refs/pull/18750/merge/index.html#WGZLGJ#4600 Links to test your changes to core in the published versions of the Babylon tools (does not contain changes you made to the tools themselves): https://playground.babylonjs.com/?snapshot=refs/pull/18750/merge To test the snapshot in the playground with a playground ID add it after the snapshot query string: https://playground.babylonjs.com/?snapshot=refs/pull/18750/merge#BCU1XR#0 If you made changes to the sandbox or playground in this PR, additional comments will be generated soon containing links to the dev versions of those tools. |
|
Visualization tests for WebGPU |
⚡ Performance Test Results🟢 All performance tests passed — no regressions detected. |
🟢 Memory Leak Test Results4 passed, 0 leaked out of 4 scenarios 🟢 All memory leak tests passed — no leaks detected. Passed Scenarios (4)
|
|
WebGL2 visualization test reporter: |
Hey there,
I have been toying with havok world regions recently, and learned there is no perfect solution for physics handling in large scale worlds.
World regions have edge cases around world migrations (2 bodies close in space should interact but are in fact in 2 separate worlds like in this PG), origin rebasing only works when physics happen close to the camera and double precision has a performance and memory hit (although I saw Jolt only uses f64 for positions to limit the penalty to ~10% jrouwe/JoltPhysics#94 (comment)).
So my point is Babylon should let havok users make their own large world implementation if they want to.
Hence this small PR adds a config flag to disable havok world regions even when floating origin is enabled.
Let me know how you feel about it!