Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Correct way to update mesh colliders for Obi Fluids
#1
Hello,

I'm trying to make Obi Fluids interact with Voxelica voxel engine, which generates chunk-based mesh colliders at runtime. However, as the Mesh objects are being modified on the Mesh Colliders, Obi Solver doesn't seem to pick up on the change. I tried manually forcing an update with several different methods in the Obi interfaces but had no luck so far. I also noticed that the GPU Solver and CPU Solver behaved differently, where CPU solvers was able to pick up on the changes with a specific combination of calls but GPU Solver wasn't. Sorry that I don't have the specific methods in mind at the moment, but I'm hoping that you can point me in the right direction.

Thanks!
Reply
#2
(06-12-2025, 11:39 AM)Voxelboy Wrote: Hello,

I'm trying to make Obi Fluids interact with Voxelica voxel engine, which generates chunk-based mesh colliders at runtime. However, as the Mesh objects are being modified on the Mesh Colliders, Obi Solver doesn't seem to pick up on the change. I tried manually forcing an update with several different methods in the Obi interfaces but had no luck so far. I also noticed that the GPU Solver and CPU Solver behaved differently, where CPU solvers was able to pick up on the changes with a specific combination of calls but GPU Solver wasn't. Sorry that I don't have the specific methods in mind at the moment, but I'm hoping that you can point me in the right direction.

Thanks!

Hi!

Calling ObiMeshShapeTracker. UpdateMeshData() should be enough for both GPU and CPU, like this:

Code:
((ObiMeshShapeTracker)yourCollider.Tracker).UpdateMeshData()

Note this is a considerably expensive operation, so it shouldn't be called every frame.

(As a side note, you have private messaging disabled in your forum user settings so I couldn't answer to your PM. You posted this question on friday and we're away for the weekend, so just saw both your PM and this forum post)

kind regards,
Reply
#3
Thanks for the response. I've made a repro project and shared it with you via PM (and also enabled receiving PMs in my user settings, thanks for the heads up).
Reply