-
Notifications
You must be signed in to change notification settings - Fork 334
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possible wiremod expression2 constraintcore rope-constraint setLength() bug #3090
Comments
Might be a gmod bug. Starfall doesn't have the ability to set rope lengths either. You can try doing it with an elastic though. |
I also experienced this when designing my E2 wrecking ball mech, but I worked around it by destroying and recreating the rope as needed. Should probably look into fixing this though. |
I'm pretty sure source doesn't allow you to change the rope length on the fly without recreating the rope itself, the documentation itself is erroneus. See: |
I found a scuffed method to get the rope to correct length, as unknao mentions the method is to recreate rope itself, but with a length parameter that is the amount of reelback or reelout you want from the default height... it's suboptimal as i think it messes with the objects physics due to being and constraint that is recreated during flight (if i throw my clawmachine around it kinda acts like something is pulling on it mid-flight almost like drag) but it seems the workaround works for stationary objects just fine. |
Someone could create a garrysmod-issue to see if its possible for a binding to be added to set rope length. |
Hello, a project of mine requires a rope constraint that is updating it's length during run, I tried to use winch for this but due to winches custom physics that make it super unrealistic on its behaviour, I tried to replicate what my goal was in rope-constraints, but for some reason even if the documentation of e2 says you can set rope constraints lengths by setLength() it doesn't work as expected but rather nothing happens.
I'll post here the rough setup of my project in hopes someone knows whether this is a bug or limitation to the rope-constraint itself:
To create rope constrain during the initialization of chip:
rope(1,SubObject,vec(0,0,0),MainObject,vec(0,0,0),0,0.2,"cable/cable2")
During the running on update loop:
SubObject:setLength(1,sin(EllapsedTime*25)*20)
According to wiremod documentation:
Entity:setLength(Number Index, Number Length) - Sets the length of a winch/hydraulic/rope stored in this entity at a referenceid
If you have any information on how to fix it on my side or in the constraintcore, all help is appreciated.
The text was updated successfully, but these errors were encountered: