Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Regarding Rope scene
#1
Hello All,
I am fairly new to Obi rope.
I am trying to create a scene as shown in the figure attached.

I have a couple of questions,
1. How to easily attach the ends of the rope to other objects (I cant just drag the control points to the objects).
2. The main object (at the center) is a plate with 4 speheres on the corners (multiple object body), so when I am attaching the rope to the sphere and run the game the plate just fallsĀ  while the sphere is still attached to the rope. Does it mean that I can only attach the rope to a single body object?
3. I want to control each rope separately, do I need to have separate obi solver for each rope?
4. Also I want to have the plate body hanging like in the freight lift example, however in my case the plate body just falls on the ground, How can I restrict the ropes extensions unless and until I give some control inputs to the ropes?

Sorry if the questions are too rudimentary.

Any advice or suggestion is greatly appreciated.


Thank You.


Attached Files Thumbnail(s)
   
Reply
#2
Hi!

(09-11-2022, 10:53 AM)rohit_dhak Wrote: 1. How to easily attach the ends of the rope to other objects (I cant just drag the control points to the objects).

Are you aiming to do this at runtime, or at edit time? Attachments don't modify either the rope or the position of the object it is attached to, they attach a particle in the rope at its current position relative to an object. Quoting the manual: http://obi.virtualmethodstudio.com/manua...ments.html

Quote:It's important to realize that attachments do not move the particle group to the position of the target object, nor the target object to the position of the particle group. Moving the particle group to the target's position would collapse all particles into a single point, and would result in a kickback effect once the particles spring back to their original positions. Moving the target could cause a whole palette of issues depending on your game logic.

Instead, particles in the group are attached at their current position relative to the target object. This makes it simple to work with multiple particles, and ensures smooth attachments with no initial "jumps" or sudden motions.

If you want particles attached at a specific position other than their position at the time of creating the attachment, you can set their position at runtime before creating the attachment: see scripting particles.

If you are doing this at runtime, and you want the rope to have a specific shape/length that ends up at a given object, you need to create the rope at runtime. See:
http://obi.virtualmethodstudio.com/manua...ctors.html

If you are doing this in-editor, the best option is to drag the control point to the object. The only other possible options are to force the position of a rope particle to that of the object (which would stretch the rope, and it would spring/kick back to its rest length as described above) or moving the object to the position of the rope control point/particle.


(09-11-2022, 10:53 AM)rohit_dhak Wrote: 2. The main object (at the center) is a plate with 4 speheres on the corners (multiple object body), so when I am attaching the rope to the sphere and run the game the plate just fallsĀ  while the sphere is still attached to the rope. Does it mean that I can only attach the rope to a single body object?

A single rope can be attached to as many objects as you need. Just make sure the spheres are children of the plate and that the plate has a rigidbody component (and the spheres do not), otherwise they will just move independently from each other.

(09-11-2022, 10:53 AM)rohit_dhak Wrote: 3. I want to control each rope separately, do I need to have separate obi solver for each rope?

Not at all, the solver represents a simulation. In fact you must use a single solver for your ropes if they are all part of the same simulation, otherwise they will not interact with each other, neither directly or via objects they are attached to. See:
http://obi.virtualmethodstudio.com/manua...cture.html
http://obi.virtualmethodstudio.com/manua...olver.html

(09-11-2022, 10:53 AM)rohit_dhak Wrote: 4. Also I want to have the plate body hanging like in the freight lift example, however in my case the plate body just falls on the ground, How can I restrict the ropes extensions unless and until I give some control inputs to the ropes?

Make sure your attachments are dynamic (otherwise rope particles will follow the object they're attached to without applying any forces on it), and that the mass of the plate isn't much larger than the mass of your ropes.

kind regards
Reply