Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to work with Rope Constraint using physics, events and high configuration?

Asked by
Ribasu 127
5 years ago
Edited 5 years ago

Let's say we have a rope constraint between two attachments:

local Att1 = Instance.new("Attachment", workspace.Terrain)
Att0.Position = pos1

local Att2 = Instance.new("Attachment", workspace.Terrain)
Att1.Position = pos2

local rope = Instance.new("Rope", workspace.Terrain)
rope.Parent = game.workspace
rope.Attachment0 =Att0
rope.Attachment1 = Att1


rope.Enabled = true
rope.Length = rope.CurrentDistance

Now we have a rope between two attachments. Let us remember what a rope constraint does: it lets the distance of attachments be, at maximum, rope.Length units away from each other.

The problem is, what if something touches the rope and we want to destroy it? There is no even t for this to my knowledge.

Also a rope constraint, if one sets it to visible, will curve inward if the size of the rope is larger than the distance between the attachment. The curve in ward ignores anything it touches, so the animation is quite poor in this sense- there doesn't seem a configuration method, or physics, to improve such animation.

My question is, whether there is any solution to these clear rope constraint problems, or whether there is an alternative constraint which is more adequate.

Answer this question