Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Simple Winch
#1
Hi,
As I have read on this forum, obi rope is average for winches, because making it stiff requires a lot of calculations. Obi is more suitable in this case to use to draw a rope. I'm trying to do that too, just having some obi problems and need some help.
In my case obi is supposed to be a visualization but behave like a normal rope, i.e. fall to the ground, react with colliders, and change its length dynamically as the winch unfolds / winds up. But I ran into a few problems:
1.I don't know how to make the obi only 30cm long. Can it be so short? When I tried to do it, it got longer, or else
she made a lot of turns.
2.if the solver can be in the vehicle hierarchy, and some script would only adjust its rotation to be 0.0.0 (this is for the clear hierarchy)
3. i want that rope does not affect the hook or the vehicle at all 
4. if it was stretched more, e.g. 40m, and stretched, the center of the rope did not fly around.

In fact, despite a few days of trying, the only thing I managed to achieve is to change its length and learn a little how it works at all. The examples provided by the package are more advanced than what I need and this is probably the problem.

What do I expect in response to these questions, as I would not like to ask a million other questions ...
a description of why it is impossible or if it is possible and how to achieve the things I asked about or how I can get around these problems
The best solution would be an example in the project, i.e. a short rope, grabs the end and unfolds, when I return to the source it does not curl but falls to the ground, the button causes the winding to occur. It doesn't even have to be influenced by physics on an object.

greetings
Reply
#2
(02-07-2021, 06:59 AM)gozda Wrote: 1.I don't know how to make the obi only 30cm long. Can it be so short? When I tried to do it, it got longer, or else
she made a lot of turns.

How are you resizing the rope? It can be any length you like. Simply change the size/shape of it in the path editor by moving control points around, it should behave exactly the same regardless of its size/length.


(02-07-2021, 06:59 AM)gozda Wrote: 2.if the solver can be in the vehicle hierarchy, and some script would only adjust its rotation to be 0.0.0 (this is for the clear hierarchy)

Solvers can be anywhere you like. Depending on what you want to achieve, it might make sense to do this or not. Placing the solver at the root of the vehicle will perform the simulation in vehicle space, and treat it as an inertial reference frame. Rotation can be 0,0,0 or not, again depending on what you want to do.

(02-07-2021, 06:59 AM)gozda Wrote: 3. i want that rope does not affect the hook or the vehicle at all 

Unless you enable some kind of two-way coupling between the rope and the vehicle, it won't. Two-way coupling takes place with collisions and dynamic attachments, as long as both the rope and the rigidbody involved have non-infinite mass (that is, are non-kinematic).

(02-07-2021, 06:59 AM)gozda Wrote: 4. if it was stretched more, e.g. 40m, and stretched, the center of the rope did not fly around.

Sorry, I don't understand what you mean by this.


(02-07-2021, 06:59 AM)gozda Wrote: What do I expect in response to these questions, as I would not like to ask a million other questions ...
a description of why it is impossible or if it is possible and how to achieve the things I asked about or how I can get around these problems

I'm not sure what you mean by your questions or what you're trying to achieve, sorry. Can you give more specific examples?

(02-07-2021, 06:59 AM)gozda Wrote: In fact, despite a few days of trying, the only thing I managed to achieve is to change its length and learn a little how it works at all. The examples provided by the package are more advanced than what I need and this is probably the problem.
The best solution would be an example in the project, i.e. a short rope, grabs the end and unfolds, when I return to the source it does not curl but falls to the ground, the button causes the winding to occur.

Do you mean some sort of automatic/motorized reeling winch? This is a very advanced use case, there's lots of complex stuff going on there: dynamically changing the rest length of the rope (adding/removing particles and constraints at runtime), strain measurements to decide whether to reel out rope if it's being pulled (need to determine a force/strain threshold above which the rope is reeled out), and a motor that reels rope back in. It's far from trivial to do.

(02-07-2021, 06:59 AM)gozda Wrote: It doesn't even have to be influenced by physics on an object.

It has to be influenced by physics, how else would you know when to reel out the rope?

There's a very simplistic motorized winch sample script included, that you might find useful: /Obi/Scripts/RopeAndRod/Utils/ObiRopeReel.cs
It measures the amount of stretching the rope is undergoing, and increases/decreases rope length if above/below certain thresholds. A proper winch would be considerably more complex to implement, though.
Reply