• Rope constraint?
    3 replies, posted
I'm trying to rope a balloon to my player's head :s. So far the rope appears, but doesn't attach to my player or the balloon. local balloon = ents.Create( "gmod_balloon" ) balloon:SetColor( 255, 0, 0, 255 ) balloon:SetPos(ply:GetPos() + Vector(0,0,100)) balloon:Spawn() local constraint, rope = constraint.Rope( balloon, ply, 0, 0, balloon:GetPos(), ply:GetPos(), 20, 2, 5000, 5, "cable/rope", 0) Could someone explain how to get this to work? I didn't really understand the wiki about LPos and WPos...
The ropes are not anchored at the entities positions. These vectors where the ropes should intially anchor at.
I'm not really following.. :s What should the vectors be if not that? EDIT: I see now, the vectors are the offset position from the entity, in case you don't want the rope attached at the middle of the entity.
I think you'll have to use [b][url=http://wiki.garrysmod.com/?title=Entity.SetParent]Entity.SetParent [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]
Sorry, you need to Log In to post a reply to this thread.