Does anyone know how to move a character in a certain area? For example, that within a volume you can only move forward and backward but not up and down. Thank you
You adjust your character’s code so that, when they’re in the volume, they can’t move up or down
I know that sounds a bit simple, but you haven’t said what sort of character. How they move up and down, and if you’ve written it, or it’s a standard character.
Hello, yes, it is a standard character in the third person. it moves in all directions. The idea is that I would want this character, when entering a volume, to be blocked or not to move to the left or right. just go back and forth. Thank you
So the standard 3rd person movement looks like this
All you have to do, is when they are in the volume, not allow right/left
Then make yourself a blueprint with a collision volume, and this code
thank you very much. your information is very helpful. I thank you
hello. use in Spanish
there I put the code for the movement
there create a new blueprints
the blueprints of my character is called “movimiento” and the move to the display window in the place where you would like the change to happen
but I couldn’t change. what will i be doing wrong? Thank you
This
is usually the keys A and D. Do they work?
You could check it is seeing your character, by putting a print string here
I am using the arrow keys to move
when it happens at that volume i would like to restrict up and down
I changed there but it still has no effect
I was thinking about this. You just want to stop the player going into certain areas, right?
Then you can just use blocking volumes:
The player can’t go inside them.
to enter the area but to block two directions. namely. that when traversing the area he can only move forward and backward but not up and down
Are you just trying to stop the player from stepping on the wooden walls?
Is this restricted motion thing relative to the world or the player? If that wall was pointing north/south, would you want to stop them moving left/right?
the wooden walls already have their collision. but the character is constantly moving and I would like to prevent the controller from getting stuck when I go past that volume. only that he can go forward and backward like pacman does and vice versa if he goes up and down. there it would be blocked to the sides
Well, the method I showed with the bool, will work. You can check which part of the moment code you’re using with print nodes.
Hello, what I want to avoid is crashing like this. as it continues long and without being able to move in that place in the way it is seen in the gif
Like I say, you have to check the movement is coming from the nodes you think, by putting debug print statements in there.
Curiously, I tried with a project that comes by default in third person and there it worked for me, but not with my project. If you want I send you my project so you can see
Ok, gimme a link. But if the project is huge, just make a new empty project, and migrate the level to that…
I sent you a message. Thank you