I have a physics constriant set up to act as as a rope with an object attached to the end.
I change the rope length throught setting the Linear Limits in my Tick function.
if(CraneConstrain != nullptr)
{
CraneConstrain->SetLinearXLimit(LCM_Limited, CableLength);
CraneConstrain->SetLinearYLimit(LCM_Limited, CableLength);
CraneConstrain->SetLinearZLimit(LCM_Limited, CableLength);
}
this works fine though there seems to be a problem with the physics calculations of the attached Object, making it bouce when the cable extents.
I assume whats happening is the following:
Object ist still
→ constraint limit gets extended (continuously)
→ object starts falling, accelerating (for a few frames)
→ object hits linear limit → velocity is killed
→ object starts falling again
→ infinite repeat of the last 2 steps
this results in the object bouncing around instead of being lowered smoothly.
Now ideally there would be a way to give the linear limit a velocity that is taken into consideration when reaching it. I cant seem to find a way to do this though.
Is there a way to solve this or will i have to make a custom solution for this? I really dont want to mess with engine physics code if possible