Skip to content
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

Open
raven1934 opened this issue Jul 2, 2024 · 2 comments
Labels

Comments

@raven1934
Copy link

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.

@thegrb93
Copy link
Contributor

thegrb93 commented Jul 2, 2024

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.

@Fasteroid
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants