Is there a way to create a slide physics constraint?

I’m trying to create a slide. If you had a cylinder with a ball inside and that ball could only move up and down because it’s constrained in such a way that physics only push it along that axis, the other axis are constrained. Additionally there would be a slide limit, which would represent the extent of the tube, so it doesn’t move past the tubes length. Currently I see the physics constraint as an option but after a lengthy run at it’s settings I want able to find a suitable method. They appear to largly operate on pivots for swinging.

I’m having trouble with the physics constraints. Can they be used on an object is already moving. If I have a scene pivot node as my root, and a sphere as a child with “simulate physics” turned on (but gravity off). If I wanted to lock the movements of the X and Y axis and only allow for physics to effect the sphere’s “z” axis, how would I go about that? Additionally if I started to rotate the “scene” node on it’s pivot the child would be expected to follow, but what I’m seeing is the child sphere snaps back after the moving is executed, like the locking of the axis’s (from the physics contraint I’m trying to use) locks it’s movement globally, I would expect this to only lock the child’s local X and Y axis, and still inherit the overall movement from the parent. Is this not how it works?

Here in this image you can see the component structure I have setup. The Gravity node is a radial force that sits directly above the character capsule. It pushes down on the character capsule which has simulate physics set to true. The physics constraint is supposed to only allow this object to move in along it’s “z” axis. When I start the level the character falls directly to the floor (through the radial force because gravity is turned off) as expected. However when I walk around - once I hit a small angle of ground the character starts to slowly lean in a direction. You can see in the image on the right, I perform a trace from the center of the character capsule to the MainPivot node which sits at 0,0,0. you can see that the player has rotated out of it’s alignment with the z axis towards this node. The only thing that gets moved is the “Main Pivot” node, and actually it’s just being rotated around the 0,0,0. The children of this node (particularly the Character capsule node) are moved only because they are children. I would expect the physics constraint to only allow the character capsule to move along it’s local “z” axis but clearly it’s also wobbling out on other axis. Does anyone know the fix for this?

In this picture I’ve performed the trace from the Main Pivot to another scene node below called CapsuleCushion. The capsule cushion is moved -45000 units downward so you can see the trace shooting from that location to the 0,0,0 Main pivot location. However you can see the player is floating in the middle. What is happening is the player falls and his falling length is limited because of the contraint (only allows 500 units). So he sits in the air, so I tried moving using my normal controls and instead of the character capsule moving only the other nodes above do - it’s like the physics constraint is stopping this object from moving at all in the other two axis. Is there a way to have the constraint only limit it within it’s local space? Instead of stopping it from the parents inherited rotation? For me this character sits on a pendulum and the pendulum swings, all I want to do is limit the character capsules relative “z” axis - but it should be able to swing freely on the other axis’s freely.

Okay this is a work around, If possible, if anyone knows the correct way to do this I would still like to hear it. To get the physics constraint working I just used the linear motion and put that on limit and established my axis limit for up and down. The rest are all locked. The trick for me to stop it from locking all the other locked axis’s globally was to link component one slot to the Root node, and Component to directly to the Physics constraint itself. The problem I was running into is that when my capsule hit an angled surface it would simulate a bump from that and rotate the character and also slightly move the character capsule off it’s center. So my work around was to get the proper location and rotation on Even Begin play, and then use those on an Event Tick to update the capsules rotation and location. Except in location I make a new vector using the 2 axis’s that I wanted to use and grabbed the Simulated “z” axis that I did want to move and combined them and feed that in as the new location. Now the character doesn’t rotate or move off center. Only slides in the axis that I wanted.