Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Runtime Instantiate
#1
I used some time ago an older version from ObiRope and i have some questions.
Do i really need to instantiate a rope with an solver as parent? (if not, Is there a callback/event where i know i can unparent the rope from the solver?)
Whats the best way to carry an Particle Attachment? In the earlier version there was an script called "ObiParticleHandle" which gave me the opportunity to carry the attachment.
The attachment is an rigidbody object.

I also noticed, that my rope is acting like a snake, how can i make it to behave like a cable which is more sticky?
Reply
#2
(15-09-2022, 08:39 AM)Rexima Wrote: I used some time ago an older version from ObiRope and i have some questions.
Do i really need to instantiate a rope with an solver as parent? (if not, Is there a callback/event where i know i can unparent the rope from the solver?)

Yes, Obi actors (ropes, rods, bones, cloth, etc) all need to have a solver up their hierarchy, not necessarily as their immediate parent. Simulation is always performed in the solver’s local space.

Older Obi versions required you to manually specify a solver component for each actor and select a simulation space, newer versions automatically pick up both the solver and the simulation space when you parent the actor under a solver.

If a rope has no solver above it, it won’t be simulated or rendered. (Just like UI elements need a Canvas above them, or skeleton bones need a SkinnedMeshRenderer, etc).


Quote:Whats the best way to carry an Particle Attachment? In the earlier version there was an script called "ObiParticleHandle" which gave me the opportunity to carry the attachment.

What do you mean “carry”? An attachment is just a relationship between the rope and another object, it is not an object itself that you can “carry” or move around as it has no position of its own.

Just add a ObiParticleAttachment to your rope, select the particle group in the rope that you wish to attach, and select the rigidbody (or any other transform) as the attachment target.

Quote:I also noticed, that my rope is acting like a snake, how can i make it to behave like a cable which is more sticky?

Not sure what you mean by “sticky”, are you referring to contact friction? That’s determined by the collision materials used by the rope and the objects it collides against. You can assign a collision material to the ObiRope component, try the included “MediumFriction” one (you can also create your own collision materials for custom friction/stickiness coefficients).

Kind regards,
Reply
#3
Thank you very much for the quick answer  Sonrisa

Just want to ask an another question, what's the best way to strength the ends?
Currently it's like in the picture.
[Image: XWoTVMS.png]

I tried to add some control points, but it doesnt solved the problem.

And i made a little gif to clarify my snake-cable: Gif
Reply
#4
(15-09-2022, 12:03 PM)Rexima Wrote: Thank you very much for the quick answer  Sonrisa

Just want to ask an another question, what's the best way to strength the ends?
Currently it's like in the picture.
[Image: XWoTVMS.png]

I tried to add some control points, but it doesnt solved the problem.

Yes, the solution is indeed to add another control point near the first one and attach both. Just like in the real world: if you have an object attached to another one by only one point, it will be free to rotate around it. You need two points of attachment to restrict rotation.

See the RopeShowcase sample scene, the ropes on the left wall are kept perpendicular to the wall using this technique. Let me know if you need further help with this.

(15-09-2022, 12:03 PM)Rexima Wrote: And i made a little gif to clarify my snake-cable: Gif

The gif doesn't really clarify much  Sonrojado... all I see is a rope behaving like well, a rope. Not sure what do you mean by snake-like:

- Does it move around too much? you can globally dampen dynamics by increasing the solver's "dampening" parameter. This is the percentage of kinetic energy lost per second by all actors in the solver. http://obi.virtualmethodstudio.com/manua...olver.html

- Is it too flexible / bends too easily? you can set "bendiness" on a per-rope basis, set both the max bending parameter of the rope and the bending compliance to zero. If the rope still bends too much, you can make it more rigid by expending more bending constraint iterations in the solver.
http://obi.virtualmethodstudio.com/manua...aints.html

- Does it slide over objects surfaces too easily? increase the collision material friction, see my previous post. Also:
http://obi.virtualmethodstudio.com/manua...rials.html
Reply