Download

How to lock up and down and camera movement for Beat Em Up style?

I have looked over many threads and watched a few tutorials but they all seem to be missing something. I want the camera to be locked up and at an angle looking down to the player as if it were a side scroller but with the 3d depth element of beat em up style. I do not want the camera to move up or down but can move left and right with the player. Perhaps not even move in toward the player (Block two vectors?) so I can create a small linear path for the character as in most beat em up games.

Player movement, the other day I asked how to make player instantly turn left or right, I got that. But now I need up and down to make the player just strafe up and down with his normal walk animation.

Any help is greatly appreciated, thanks!

Make the camera a separate entity:

This way you’ll have more control. The fighters can have their own cameras you can switch to to pull off a wicked move.


Below, the camera tracks the position between the 2 players, ignoring their Z which is set to a fixed value instead.

This script should be in the camera actor, not in the LB - here to demo only.

I skipped v4.26 and keep discovering neat little things in 4.27 I did not see documented:

Preblended Bender

image

Thank you very much for helping me Everynone, you seem very wise with UE4. I made an actor Blueprint just for a camera, added a camera component, and dragged it into the world, and then tried to reproduce the code above. You will have to help me with the persistent level nodes. I couldn’t find them. I watched and read some things about how to open levels in window tab but I honestly do not know much of anything about them, for now I’m shooting just for the one cam added by the actor blueprint.

I guess it is time for me to upgrade to that version.

What I suggested above isn’t really a solution, it’s more of a suggestion for a method. The persistent nodes are part of the level blueprint and, as mentioned above, should not be really used for this - it was just easier to demo things. Apologies for the confusion.


Perhaps you could start out with something a bit more straightforward and built from there:

The above is using the existing camera in the side scrolling character. Do tell how it goes and whether it behaves well enough.

Ok thanks for clearing that up. Here is what it did. Desktop 2021.09.15 - 02.17.58.03.mp4 on Vimeo

It is a start yes, appreciate it. Now I just got to figure out some math to check if player is looking either east or west then base his up and down walk on that and essentially strafe up and down with walking animation playing. That seems like what those games are doing.

This might do it:

So get forward vector will obviously have the direction player is facing, then the dot node (which is the first time I saw this node was in this thread) seems to add two vectors together, which is adding 1 on the Y, feed that to a less than set to zero. That feeds into a select node (another new node to me) which I feed that boolean output into the bottom (index), judging from the colors and the text options in the image I changed the pin type to NAME.

I didn’t see how the NAME output could help me achieve this effect. So I changed the node to a vector and fed that to the world direction of an add movement input node for input axis move forward.

What it did interestingly enough, was make the player instantly face north and south upon key press, however no actual movement occurs now north or south for the player, just faces the direction.

I’m not sure how to accomplish this effect, a strafed up and down movement with just walking animations playing, I some what believe a blend space could achieve this effect if tweaked just right. But I don’t think that BS could help determine the direction to face while moving up or down…perhaps two blendspaces tweaked just right controlled by the code being made above.

Any ideas? Thanks for all the help!

Oh, this should not be used for movement. This only tells you the direction relative to where the player is facing. Normally you’d use it to calculate the angle. I thought that’s what you were asking here:

figure out some math to check if player is looking either east or west

The West East and so on would depend how things are set up. In case of the template, it’d look like this:

Not sure if you need it, but you asked.


Dot is visualised here:

Perhaps that’d clarify it a bit.

this node has existed for ages.