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
Help obi rope Collison and twine
|
06-07-2023, 07:35 AM
(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
06-07-2023, 07:45 AM
(06-07-2023, 07:35 AM)josemendez Wrote: Hi!My Obi Rope Version is 4.1 ,so maybe what you said is not work in my version
06-07-2023, 08:45 AM
(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 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, (06-07-2023, 08:45 AM)josemendez Wrote: In that case: 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) 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.
10-07-2023, 01:21 PM
(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/manua...icles.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,
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!
11-07-2023, 10:39 AM
(This post was last modified: 11-07-2023, 10:41 AM by josemendez.)
(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.
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 obicolliderI Have modifide the phase on the Obi Collider, and it has collision effect when i Created it |
« Next Oldest | Next Newest »
|