Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ObiRope Collision Penetration
#1
I wanted to make a couple of loops around the pole, but when I moved the rope after one loop, the rope went straight through the pole, and it's more likely to happen when the rope is pulled longer, please help me to avoid this problem.


Attached Files
.jpg   VeryCapture_20230802164520.jpg (Size: 16.1 KB / Downloads: 45)
Reply
#2
(02-08-2023, 09:41 AM)Raymond Wrote: I wanted to make a couple of loops around the pole, but when I moved the rope after one loop, the rope went straight through the pole, and it's more likely to happen when the rope is pulled longer, please help me to avoid this problem.

Hi Raymond,

How are you pulling from the rope? If you're using a static attachment and/or directly setting the transform position of an object attached at the end of the rope, you'll be able to pull regardless of any forces applied by the rope and eventually, collisions and other external forces will top working since directly setting transform.position ignores all physics. This is the case with Unity rigidbodies as well.

Make sure you're using a dynamic attachment and moving the object using forces.

If this is still a problem, use more substeps and/or collision constraint iterations to improve simulation quality. The manual contains an in-depth explanation of how the engine works internally and how substeps/iterations control output quality: http://obi.virtualmethodstudio.com/manua...gence.html

let me know if I can be of further help,

kind regards
Reply
#3
The problem above Has been solved by change the distance constraint of the rope, but there's another problem ,when I save the gameobject made of ropes to be a prefab ,it isn't the same with what I twined before ,In 4.1,I can set the active of the gameobject false then true to trigger the dirty flag, and save what I want successfully, but it dose's work in 6.4
Reply
#4
Does 4.1 fit unity 2021.3.24
Reply
#5
(04-08-2023, 09:43 AM)Raymond Wrote: Does 4.1 fit unity 2021.3.24

Hi,

No, 4.1 is not compatible with anything above 2019.4.
Reply
#6
(03-08-2023, 03:49 AM)Raymond Wrote: The problem above Has been solved by change the distance constraint of the rope, but there's another problem ,when I save the gameobject made of ropes to be a prefab ,it isn't the same with what I twined before ,In 4.1,I can set the active of the gameobject false then true to trigger the dirty flag, and save what I want successfully, but it dose's work in 6.4

In 5.X and above, actor data is stored in a blueprint (which is a ScriptableObject), not the GameObject itself as that bloats scene file size.

If you want to save rope state at runtime, create a new blueprint and save particle data to it. You can use actor.SaveStateToBlueprint(blueprint) for this.
Reply
#7
(04-08-2023, 10:12 AM)josemendez Wrote: In 5.X and above, actor data is stored in a blueprint (which is a ScriptableObject), not the GameObject itself as that bloats scene file size.

If you want to save rope state at runtime, create a new blueprint and save particle data to it. You can use actor.SaveStateToBlueprint(blueprint) for this.
I Have tried this method,it worked actually,but I don't know how to create a new blueprint to replace my twined rope and save state to the new one then save it to my asset, Would you please show me a example ,thanks a lot!
Reply
#8
(07-08-2023, 03:56 AM)Raymond Wrote: I Have tried this method,it worked actually,but I don't know how to create a new blueprint to replace my twined rope and save state to the new one then save it to my asset, Would you please show me a example ,thanks a lot!

Hi,

Blueprints are just ScriptableObjects, so all of these are done using built-in Unity functions just like you'd normally do. See:
https://docs.unity3d.com/ScriptReference...tance.html
https://docs.unity3d.com/ScriptReference...Asset.html
https://docs.unity3d.com/ScriptReference...ssets.html

kind regards,
Reply
#9
(07-08-2023, 09:50 AM)josemendez Wrote: Hi,

Blueprints are just ScriptableObjects, so all of these are done using built-in Unity functions just like you'd normally do. See:
https://docs.unity3d.com/ScriptReference...tance.html
https://docs.unity3d.com/ScriptReference...Asset.html
https://docs.unity3d.com/ScriptReference...ssets.html

kind regards,
There's problem if I have more than 100 levels, there will be more than 300 hundred blueprint in my asset, my apk size will be very huge Confundido
Reply
#10
(08-08-2023, 03:29 AM)Raymond Wrote: There's problem if I have more than 100 levels, there will be more than 300 hundred blueprint in my asset, my apk size will be very huge Confundido

The amount of data you'll be dealing with is exactly the same regardless of where it is stored: GameObjects in the scene, or ScriptableObjects.

Moreover, blueprints are extremely small compared to say, textures or audio. For instance, a blueprint with 112 particles (12 active and 100 pooled, which allows you to have a pretty long rope) is only 50 kb. Even if you had 300 hundred of them you'd only be looking at 15 mb, which is hardly a concern.

kind regards,
Reply