Dynamic Top Down Camera

Hey there, I’m trying to create a top down camera that moves in conjunction to the mouse. The camera is tilted slightly so it’s not 100% top down. One game that has a camera like this is Miami Vice. Here’s what I got so far

Gif of movement in action: http://imgur.com/H4vRr6r

There’s two main issues with this though, even though it kind of does work…

  1. You can keep moving the camera off screen forever.
  2. With how I have the character to face the mouse, the two become desync’d. I don’t have the foggiest notion of how to sync these two things up. But anyway you can check that bit out here:

There’s this tutorial for RPG game maker which is essentially what I’m trying to make, but I’ve no idea how to translate what he’s saying to blueprints. Game Maker Studio: Dynamic Camera Tutorial - YouTube

Thank you.

  1. Clamp the distance.
  2. That code looks fine, can’t imagine how it would go out of sync. Maybe the trace isn’t hitting anything.

P.S. is this for the community dev thing? I lost access to the discord and haven’t been able to get back -.- Recognize ya from there

Hey how’s it going? It’s not for the community thing but a personal project of mine. Discord This link should work for the discord, it’s also on UGD’s announcement video I believe. If it still doesn’t work let me know.

Anyway…

I tried clamping but all that does is slow it down (I think?). What I want is to somehow limit how far the camera can extend out. I think I can do this by something like…

Check player location and cursor location, divide that… Or something. I really don’t know. The video does show exactly what I want however. I just can’t quite translate it to blueprint.

I found a solution that will work for now thanks to this thread: https://answers.unrealengine.com/questions/229080/camera-between-player-and-mouse.html

The multiplications determine how big the box around the player is. * -0.5 and * 0.5 would be half the screen that you can move, where +/-0.1 is just a small area in the immediate zone. I would still like help on how to turn this into a sphere around the player instead of a square, as I imagine that would feel nicer. So if anyone has any clues let me know.