Hi Peeps so ive been trying to do this for a while now - I want to get to the players active camera and then grab its velocity for use.
Most recent attempt is by using "GetPlayerController(GetWorld(), 0)->GetPlayerCameraMAnager();
In the PlayerController.h PlayerCameraManager clearly exists but for some reason im getting the error : ‘GetPlayerCameraManager’: is not a member of ‘APlayerController’
The camera manager, at least I think, does not actually move or have a velocity, I believe you need the camera actor itself. This is only a guess, but the following function inside of APlayerController returns ACameraActor reference:
Hey DevinSherry thanks for the help, So I have used GetActorLocation(); on the camera manager to see if it moves or not and it does indeed move around when the player does.
Im wondering if this has to do with physics simulaton or not? i wonder if you know how to check / activate that to enable the GetVelocity(); function to work?
Ok did some digging and yes this is what it seems to be - I added a SceneComponent to the CameraManager and then checked / set that it was to simulate Physics.
After that i was able to use “GetComponentVelocity”
not sure how to enable physics on a rootcomponent or if its possible without a scene component
EDIT:
Sorry this was wrong information the component i added was a USphereComponent and then SetSimpulatePhysics to True