So I'm trying to make a rope from one vector to another for debugging purposes, and I'm not sure how exactly to use the constraint.Rope function.
[url]http://wiki.garrysmod.com/?title=Constraint.Rope[/url]
What do I choose as my entities and bones? The two vectors I am using are not moving.
What I tried:
[lua]constraint.Rope(nil,nil,nil,nil,tr.start,tr.endpos,(tr.endpos-tr.start):Length(),nil,false)[/lua]
Can someone write a function like this to show me?
[lua]function rope(vec1, vec2)
-- draw a straight rope from vec1 to vec2
end[/lua]
Thanks in advance
You could use render.DrawBeam but I'm not sure if it's what you want
[b][url=http://wiki.garrysmod.com/?title=Constraint.CreateStaticAnchorPoint]Constraint.CreateStaticAnchorPoint [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]
[b][url=http://wiki.garrysmod.com/?title=Constraint.CreateKeyframeRope]Constraint.CreateKeyframeRope [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]
[editline]22nd December 2010[/editline]
Oh reread, victor has the function you want.
DrawBeam was what I was looking for, thanks.
there is also debugoverlay.Line(vec1, vec2, lifetime, color)
[editline]22nd December 2010[/editline]
since you're going to use it for debugging
Sorry, you need to Log In to post a reply to this thread.