Fighting Game Camera

So I’m trying to do something for fun, and for starters I wanted to get an SF-like camera (I believe it’s called an ortographic camera, may be wrong) where it looks at 2 players in the screen and doesn’t let them move past the limits of the camera, I followed this tutorial > .

But for someone like me who is new to UE4 and the blueprint system, it doesn’t explain things very in-depth, I followed every step yet when I get the camera working, the C1 (Character 1) can move past the camera freely and doesn’t respect C2’s (Character 2) position.

Current Visual Setup -

Camera Components -

Event Graph -

Event Tick -

If anyone here could help me out I’d be grateful, searched for this problem over the internet but couldn’t find an answer to it, thanks by the way.

BUMP (Bumping the post up, didn’t see any rule about it, though I think it should be added).

Bumping the post up again :expressionless:

Hi! You have a couple of options, but I will tell you what we are doing for Super Smash Ponies, though our camera will be a little more complicated than what you need. Basically, you need to:

  • Get the view frustum width and height.
  • Get a player bounding box width and height with some padding.
  • Move the camera on the Z back and forth to adjust the view frustum to be just big enough to contain the player bounding box.

Now, while this is the Unity docs, the info is good and will apply here:

Holler if you need more help. I might be able to whip something up if you get stuck.

Welp, I had it just about done. I put together a pretty dank camera with all kinds of little features for a fighting game. I was going to toss it on here, and you know what, the editor crashed. I put a comment on a branch node and I guess that was just too much for the engine to handle. Regardless of auto-saving, it undid hours of work. I’m done.

I will be back in a year when Unreal can stay stable through very basic blueprint editing.