Adding an offset to linear limit on a Physics Constraint?

Hi there - I’m wondering, is it possible to add some sort of offset to a linear limit? For example, I have a drawer in a desk I can pull out and put back in. I need the drawer to start at one end of the limit, rather than the limit being in the middle of the component its linked too.

I have it sort of working:

But then if you try to push it in further, it goes crazy (becuase its not at one end of the limit when inside the desk, and trys to penetrate through):

Here’s what it looks like in the Blueprint viewport, where I tried simply just offsetting the Physics Constraint:

f56be3f90e2be8be66b180d7976ec2822454f999.jpeg

Any help on this would be awesome. I’m using a Physics Handle to move the drawer (along with a lot of other different objects too). I should also mention that the drawers are child objects in the desk’s blueprint, although this dosent seem to be having much a difference as to when i simply just put the exact blueprint in the scene and attempt to move it.

Constraint connects on both ends to pivot of the components. What you can do is move pivot on the mesh itself (you have to move in Blender/Maya/3dsmax and re-import model). Then you can have shorter limits of constraint and offset (at least visually) in position.

Hey man, maybe I’m misunderstanding, but I’m not really sure this is a proper solution (I tried), as its still just moving itself to the middle of the linear limit, even when the mesh is offset.

Is there maybe just a way to have the object start at one end of the limit upon construction?

Edit:

I ended up fixing it by using the “Set Constraint Reference Position” node on Begin Play and setting the Y value (axis drawer moves on) equal to the linear limit size. This seems to orient the drawer to the far end of the axis, and does not allow it to move past.

2 Likes

I think you can move them in the BP editor too, forgot about this.

Any news on this one? I got this issue, really frustrating… Didn’t find any solution online.

any updates on the issue? no changes in 4.14

Hey I’m also interested on this, is there a way to set a linear limit now on 4.23?

Still an issue in UE5 EA2, so it won’t likely to be fixed ever. My solution: keep “Disable collision” constraint parameter off. This will prevent drawer from passing back wall of your piece of the furniture. It will require fine tuning of colliders of furniture and drawer meshes, but for projects like this it’s a must anyway.

1 Like

This is pretty silly. There is literally a Pos 1 parameter that one would expect might control this behaviour, but it seems the engine calculates this parameter itself and you’re not allowed to change it.