How to constraint planes of 2 axis? (character movement)

Hello, I searched on google and there is nothing about this. It seems working with just one axis in movement settings.
I must set with movement and not physics constraint because I want to use also world transform.

You can just recode the movement part of the character and move sure it can only move in the axis you specify:

Hello again, sorry I am quiet new, so I don’t understand what do you mean by recoding the movement part of the character.
In BP script, the nodes about plane constraint are just the same as I can do in the movement settings so I don’t see what I have to recode.
If you could explain me.

In your character BP, you have the movement nodes:


You’ll notice they get a forward vector or a right vector and then feed it into ‘AddMovementInput’. Well you can split the pins on those vector nodes and only feed some of it into the movement input node. Usually its ( something like ):

Which gives you normal forward movement. But if you want you can do something like:

Now it’s possible to move forward and backward, but you can’t go up and down.

Same with right vector.

EDIT: In fact that answer doesn’t work AT ALL, I just tried it :slight_smile: But the that’s the bit you need to fiddle with in either case…

EDIT2: If your pawn was a bird, then that example would stop it going up and down.

I appreciate the effort you put to this explaination, but unfortunately it is not what I search. I talked about plane constraints which are in character movement settings. On the screenshot, I show you where it is (right side).

The movement is not an input. In my case, I just want to lock 2 axis (x,y) when my character is on a rotating platform so the character is not getting away (while walking on the rotate thing). Maybe with getvector", we can still do something? But with which node…

Can you draw a simple diagram? If you want to lock XY, that only leaves Z, and I’m assuming you don’t want them moving up and down either. So that’s XYZ all locked, which is just no movement.

Is that what you mean?

Or by lock XY do you mean no jumping? etc…

Yes, It should leaves only jumping. edit: cannot move on XY

Yeah, this is what I was saying. In the character, make a bool, OnlyJump. The default controls in the character are:

You change it to:

So when the bool is set, it’s only possible to jump. No other movement. ( I did test this :wink: )

PS: The nodes are slightly different in third person, but it works the same way.

As I said I don’t want an input and the character is on a rotate thing, with your script the character keeps being getting away and that’s normal, I know it is complex so I drew something :

Hi - thank you for the diagram.

So are you saying the player is on a ball and you want to know which way is up?

Then that would be GetUpVector, it always tells you how to combine XYZ to get ‘up’.

My jump is already set so no worries about up vector, I just want to know how to prevent the character getting away from the rotating ball by locking X and Y axis character movement component.

I don’t think you can use constrain to plane to allow only Z movement, because Z is not a plane.

You have to do it as above, sorry…

I will try to find another way to do that, that’s okay. Or maybe someone else knows… 2 axis plane constraints would be cool as an update in the engine.