Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Suggestion / Idea  Obi Rope snake "collision".
#1
Hello, I am trying to find a way to simulate collision or resistance through proximity instead of Obi colliders. I have been working with the snake controller from Obi rope and thought I would attempt to make a snake that can move on the surface of water. This obviously would require my water to be a mesh object and have an Obi collider. I would like to avoid that.

To make objects float/roll with waves I currently search for the height of the water at that position of my object. I generated multiple colliders that float on the water around the snake and it worked but not very well. 

I was wondering if there is a way to use distance fields with transforms instead of colliders. Something that isn't a hard collision but more of an add forcer per rope particle to move towards the transform position I apply. 

Any ideas are helpful! 

Thanks,
Reply
#2
(23-04-2024, 11:06 PM)BCC_Gummybear Wrote: I was wondering if there is a way to use distance fields with transforms instead of colliders. Something that isn't a hard collision but more of an add forcer per rope particle to move towards the transform position I apply. 

Hi,

This is what triggers are for. Add a distance field to a collider that has "trigger" enabled: it won't cause collisions but will generate contacts anyway (one contact per particle).

Then you can iterate trough the contacts in the contact callback and get the distance to the field's surface for each one of them, then calculate and apply whatever force you need based on this distance.
http://obi.virtualmethodstudio.com/manua...sions.html

let me know if I can be of further help!
Reply