Obi Official Forum
Help obi rope Collison and twine - 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: Help obi rope Collison and twine (/thread-3927.html)



obi rope Collison and twine - Raymond - 06-07-2023

My rope can be wound like this before, and the collision between the ropes will not penetrate. I have not written other control scripts to simulate winding and collision, but the obi Rope in a new project I am now cannot achieve this effect. I have been searching for a long time but have not found the reason, I hope the developer can help me find the reason


RE: obi rope Collison and twine - josemendez - 06-07-2023

(06-07-2023, 03:06 AM)Raymond Wrote: My rope can be wound like this before, and the collision between the ropes will not penetrate. I have not written other control scripts to simulate winding and collision, but the obi Rope in a new project I am now cannot achieve this effect. I have been searching for a long time but have not found the reason, I hope the developer can help me find the reason

Hi!

- Check that particle collision constraints are globally enabled in the ObiSolver component.
- Make sure the collision filters in the ropes are properly setup to allow them to collide (they should be by default, if you create new rope blueprints)
- Make sure the rope blueprint resolution is high enough so that there's not big gaps in between particles (or, use surface collisions).
- Make sure the amount of simulation substeps is high enough in your ObiFixedUpdater component.

kind regards


RE: obi rope Collison and twine - Raymond - 06-07-2023

(06-07-2023, 07:35 AM)josemendez Wrote: Hi!

- Check that particle collision constraints are globally enabled in the ObiSolver component.
- Make sure the collision filters in the ropes are properly setup to allow them to collide (they should be by default, if you create new rope blueprints)
- Make sure the rope blueprint resolution is high enough so that there's not big gaps in between particles (or, use surface collisions).
- Make sure the amount of simulation substeps is high enough in your ObiFixedUpdater component.

kind regards
My Obi Rope Version is 4.1 ,so maybe what you said is not work in my version Llorar


RE: obi rope Collison and twine - josemendez - 06-07-2023

(06-07-2023, 07:45 AM)Raymond Wrote: My Obi Rope Version is 4.1 ,so maybe what you said is not work in my version Llorar

In that case:

- Check that particle collision constraints are globally enabled in the ObiSolver component.
- There's no collision filters in 4.1, so no need to pay attention to them.
- In 4.1, there's no surface collisions so you just should ensure there's enough particles in the rope (high enough resolution in the ObiRope component)
- Also no substepping in 4.1, so make sure the amount of distance constraint iterations in the solver is high enough instead.

kind regards,


RE: obi rope Collison and twine - Raymond - 07-07-2023

(06-07-2023, 08:45 AM)josemendez Wrote: In that case:

- Check that particle collision constraints are globally enabled in the ObiSolver component.
- There's no collision filters in 4.1, so no need to pay attention to them.
- In 4.1, there's no surface collisions so you just should ensure there's enough particles in the rope (high enough resolution in the ObiRope component)
- Also no substepping in 4.1, so make sure the amount of distance constraint iterations in the solver is high enough instead.

kind regards,

I finally found out that the phase property of each particle on the rope must be different to collide. Is there any interface that can directly modify this property (Obi Rope4.1)
[attachment=1827]

There is still a problem, how to save the rope wound at runtime into the prefab, and keep it in the same state as it was wound at runtime,
It is indeed possible to do this, but the previous development forgot how to operate,This is the prefab that was saved before. It has been wound, and it is in the same state as it was when it was saved.[attachment=1828]


RE: obi rope Collison and twine - josemendez - 10-07-2023

(07-07-2023, 03:29 AM)Raymond Wrote: I finally found out that the phase property of each particle on the rope must be different to collide. Is there any interface that can directly modify this property (Obi Rope4.1)

Phases can be modified per-particle, as any other property. See:
http://obi.virtualmethodstudio.com/manual/4.X/scriptingparticles.html


There is still a problem, how to save the rope wound at runtime into the prefab, and keep it in the same state as it was wound at runtime,
It is indeed possible to do this, but the previous development forgot how to operate,This is the prefab that was saved before. It has been wound, and it is in the same state as it was when it was saved.
[/quote]

There's many ways to do this, they all basically involve accessing (see the above link) and storing the particle positions at runtime. Could be in the prefab, in a custom file, sent to a server... no idea how your previous developer would have implemented this.

kind regards,


RE: obi rope Collison and twine - Raymond - 11-07-2023

I checked the code of the previous developer and found that he only used dotween to move the rope and PrefabUtility.SaveAsPrefabAssetAndConnect() to save the model as a prefab, I did the same thing, but did not get the expected result, after saving as a prefab, the rope the same as when it was first created.This has bothered me for a long time hoping to find out why,Thanks a lot!


RE: obi rope Collison and twine - josemendez - 11-07-2023

(11-07-2023, 10:20 AM)Raymond Wrote: I checked the code of the previous developer and found that he only used dotween to move the rope and PrefabUtility.SaveAsPrefabAssetAndConnect() to save the model as a prefab, I did the same thing, but did not get the expected result, after saving as a prefab, the rope the same as when it was first created.This has bothered me for a long time hoping to find out why,Thanks a lot!

That can't possibly do anything regarding saving the rope's state, as it completely ignores particles - whose positions determine the shape of the rope. Moving the rope will only move its transform, and  PrefabUtility.SaveAsPrefabAssetAndConnect() will only save public (serialized) component fields.

Look for places where the solver's positions array is used throughout your codebase.


RE: obi rope Collison and twine - Raymond - 13-07-2023

Why does my collider have no collision effect when reloading after saving the prefab? I need to modify the parameters on obicollider

(13-07-2023, 03:10 AM)Raymond Wrote: Why does my collider have no collision effect when reloading after saving the prefab? I need to modify the parameters on obicollider
I Have modifide the phase on the Obi Collider, and it has collision effect when i Created it