Suggestion / Idea Obi Rope snake "collision". - Printable Version +- Obi Official Forum (https://obi.virtualmethodstudio.com/forum) +-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html) +--- Forum: Obi Rope (https://obi.virtualmethodstudio.com/forum/forum-4.html) +--- Thread: Suggestion / Idea Obi Rope snake "collision". (/thread-4183.html) |
Obi Rope snake "collision". - BCC_Gummybear - 23-04-2024 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, RE: Obi Rope snake "collision". - josemendez - 24-04-2024 (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/manual/6.3/scriptingcollisions.html let me know if I can be of further help! |