So the MainPlayer_BP stays in center screen at all times and I can move the mouse around the main player freely with a fixed distance so the player is always in view.
This doesn’t currently work.
I think it’s my attempt at using Get Mouse Positions.
So I’m trying to create a clamped square around the player using the MaxCameraOffset.
I’m not sure of it’s the correct way to do it by I’m trying to just plug Actor Location and the clamped square into VinterpTo to have the camera move smoothly to the new location.
At the bottom I had it connected up with Convert Mouse Location To World Space instead of …Scaled by DPI.
I had that made into a vector together with Actor Location and that set into Vector Clamp Size 2D., but it didn’t work. Just moved the camera in opposite direction of mainplayer forward vector.
Am I on the right track here or is this the complete wrong approach?
You can check out this approach of mine from another topic on the same subject!
The only difference from your objective would be that this approach expects an input to drag the camera, which you can easily change by triggering the logic after Event Tick instead of an IA.
You can get the hit result under cursor by dragging the Get Hit Result Under Cursor by Channel node out of the Get Player Controller node, break the hit result, get the location pin’s x & y values and constantly set the camera’s location to them while keeping it’s own z value