Not really making a game, just learning how to do different things right now.
So I’ve been working with cameras lately. I’ve built a ‘top down’ type system where the camera is the player pawn. So far, I can click on an actor and the camera moves to that actor. I can hold the right mouse button and rotate my camera up/down and left/right and all this is working fine.
The next thing I was trying to do is drag by holding the left mouse button. Hold the LMB and drag the map to reposition the camera. This works fine as long as I’m facing north (I guess what I’m defining as north) However, if I rotate around and do it, everything moves backwards. Negative X on the mouse is now opposite of what negative x in the world is.
How do I compensate for this? I’ve tried a dozen different things, but they were not successful. I’m not fully wrapping my brain around what needs to happen to make this work properly. I could use some advice or maybe a pointer to a tutorial or something.
Thanks.