[BUG?] Move Capsule Component To, X & Y switch

Hi, i am working on a BP which drags my capsule to a Ledge (mesh). For the Location and Rotation i use the red arrow, but i don’t want to move the capsule to the exact location of the arrow and instead use only the X and Z of the arrow and the Y of the capsule, therefore when i am jumping from a ledge’s edge to another ledge, my character’s Forward direction remains unchanged. This works great from A to B, but from B to C this stuff that i wanted to avoid takes place, so somehow the Y gets replaced by the X… is it a bug or does it require more detailed math? I spent about a year with the engine but i’ve never encountered this stuff, any help is appreciated! looking forward to your reply!

So, here’s the thing, you are using X and Y for the A to B, and it works great because you are moving forward (only need the X axys) but then to go from B to C you are going to the Right side (Y axys, which is disconnected), so you should use X for the first path (A to B) and Y for the second path (B to C).

As you are using world location, the actor rotation doesn’t matter for the axys you are using to move it. If instead you used for example add relative force and rotated the character to face the arrow you want, that would work also.

Hope that was clear enough, good luck :slight_smile:

Well that’s exactly what i was thinking about.
So is there a way to make a script for knowing when X and Y switch and therefore switch the connections in the Move Component To node? I think using a select float would do the switch, but what is before that? Thanks for the answer.

Yup, use two Select Float nodes, plug one to the X and the other to the Y, use a the same Boolean for both, and use the NOT for one of them. Connect the current X and Y axys float location to the B input on the Select Float node and the next location on the A input. Connect the output of each one of them to the ‘Move Component To’ node.

I’m sorry if there’s something wrong with it, i’m doing it all on my head and i’m a very visual person, if for some reason it doesn’t work tell me and when i get home i’ll do it by myself and print the BP graph.

Anyways i’m pretty sure this should work, have a good day.

Did it, just remember that it will only work if you are going to use only ONE axys, X or Y, otherwise you’ll need another approach, i can help with that if you need.

hmm, it’s not working very well. The ‘Choose side’ variable would need to be set manually, depending on the X Y direction and also set when the character is jumping backwards, from C to B and so on. Also i have noticed some offsets between my feet (which should touch/be above the mesh) and the location where it should be moved to. My question still remains, is there any way to constantly check whether the capsules X matches the arrow’s? I don’t have big math studies so i am trying to explain the best i can. This is more of an aesthetic issue as it would give an ugly view of the whole ‘‘move to’’ thing (jumping from the edge of the ledge and moving the capsule to the exact position of the arrow), however if a solution is not to be found (also submitted the post as a bug report) all concludes to a more restrictive level design which is not a bad thing, maybe just a frustration :slight_smile:

btw, that offset is increasing gradually from ledge to ledge which is also an interesting thing.

You can do fine adjustments, like just adding some value on the Z axys, the thing is that I personally wouldn’t give this approach much working time, there are so many other methods, I usually go for the ones that adapt better to the environment.

Here’s what I would do:
Lock constraint accordingly to the path, so that he can only go that way and when he gets to the end, set him free.

Yep, using constraints would do it, just like you said or how i scaled the meshes in the pictures, thanks for the help so far!

Yup, glad to help :slight_smile:
I’m making a realistic climbing system myself.

Nice to hear about it, cheers!