How can i recreate the RMB freelook camera control in BP?

  • If I turn off the ‘use default keyboard input’ in my pawn (to use my own movement controls) the RMB freelook is turned off. Where can I find information on recreating the RMB freelook camera control in blueprint?

Nevermind, I figured it out myself. Wow, Math Expressions in 4.2 are nice.
This may not be the best way, but it works well enough. The freelook moves faster as the mouse gets closer to the edge of the screen. The math assumes that the HUD is 1280x720. Alternatively, a HUDX and HUDY value could be obtained from the Event Receive Draw in a HUD blueprint and passed in as inputs to the math expressions

In the image:

1 “FreeLook” event called by Tick in Pawn Blueprint. RightMouseButton controls the gate.

2 “FlyingPlayerController” is established by a cast on BeginPlay in Pawn Blueprint (see casting/blueprint communication)

3 The default value for “CameraYawRate”, and “CameraPitchRate” is 750.0, but it could be any value you like.

4 The default value for “FreeLookSpeed” is 1.0 and would be used just as a multiplier on top of the Rate values.

That’s awesome, thanks for sharing the solution!

Thanks! I still wonder is there an ‘official’ way to do it?

I have explained the other basic controls/movements in blueprint here: Flying Game Controls, pp 67-70 of my notes: http://goo.gl/jEHT0u

Did Unreal ever update where you can change “Use Control Rotation” at run time so you can switch back and forth between free look and the camera following the vehicle?

tomofnz, did you find an official way to do this very common view? The very easiest way to do this would to be able to flipflop the camera boom from pawn controlled back to player controlled.