I’m trying to use a physics constraint to make an invisible rope between 2 objects, but i’d like it to spawn taut, meaning that the 2 objects cannot move any further away from each other. This doesn’t seem to be possible using the vanilla constraints though because on spawn using the limit variable the 2 objects will be able to move away from each other by the amount of the limit variable.
It doesn’t work like that. Lets say you have 2 objects that are 10 units apart, and you use a physics constraint with a linear limit of 10 units. On spawn those 2 objects will be able to go away from each other another 10 units.
What I’m looking for is for the objects not to be able to move away from each other on spawn.
I’ll try that, though I was hoping to create ropes during play. It’s really easy to reproduce. Just drop 2 cubes in a level with simulate physics on, then throw a physics constraint in between the two with the x,y,z linear limits set to “limited” with whatever number you choose as the limit and you’ll see they can move apart.
The easiest way to see this is to have 1 cube above the other and set the top cube to not simulate physics then watch as the other cube drops a certain amount when you play the level in editor.
MostHost LA, I did something similar. On begin play i calculated the distance between the 2 objects. Then saved the location of 1 object and moved it ontop of the other object, THEN constrained them both (in blueprints) with the linear limits set to the calculated distance. Then after that I placed the 1 moved object back to its original location.
It feels like it should be more straightforward than this, but hey it works.