Project: CameraLearning
Blank project, no starter content
Entire contents: 1 blueprint called CameraPawn_BP (and the default map)
The CameraPawn blueprint has a scene component as the root, a spring arm attached to that, and a camera attached to the spring arm.
All the “movement” is controlled by SetActorWorldRotation, SetActorLocalRotation, SetActorLocation, AddActorWorldRotation etc, based on mouse inputs. I use a timeline and lerp when I select an actor which moves the camera to that actor.
… and that’s it. I deleted everything but the floor, dupped it a few times to test the “movement” between them when selected.
No movement component, no player controller, no anything else.
I’m just trying to learn, not build a game.
Anyway, none of the templets have the functionality I’m trying to build, so there was no point in using any of them.
I want to left click and drag the map under the camera (technically it’s the camera that moves not the map) … and it works, but only in world space. So moving the mouse in a -X directions results in the camera moving in a +X direction (simulating the world moving underneath) The problem is when I rotate my camera to another direction. Now I’m facing “south” and moving the mouse in a -X direction results in the world STILL moving in the +X direction, but I need it to move relative to my facing and NOT according to absolute world space direction. Unfortunately, none of the relative functions, like SetRelativeLocation, seem to function.
Plugging my mouse inputs to all of the following have produced the exact same results:
SetActorLocation
AddActorLocalTransform (Splitting the pins and using just the location ones.)
SetActorRelativeLocation
SetRelativeLocation
SetWorldLocation
All of these work, as long as I’m only facing north, and don’t work as intended if I’m facing any other direction.
I tried some others that didn’t seem to work at all like
AddActorLocalOffset
and others I don’t remember now
Thanks for the help