Lean Mechanic (camera rotation and collision issues)

Hey there,

I am currently implementing a lean mechanic like in Dishonored with Blueprints (to get some quick prototyping going) and have made pretty good progress.

However I have two issues:

  1. Setting camera rotation does not work if “Use Controller View Rotation” is enabled. But if I disable it there is no longer any vertical rotation (pitch) happening when moving the mouse. How to solve this?
  2. When Leaning I both rotate and offset the camera parent (I have used a Scene node within Component view for that). But there is no collision going on and the camera would be looking through solid objects. You can see how it should work in the linked example video. Any good solutions?

Really interested to know how to fix the first issue properly and happy about any hints regarding the second one:)


My blueprint so far:

I’m no expert - nor have i used UE4… but a possible solution to #2 could be increasing the collision size of your player in the direction of the lean. That way, if you lean into a wall you’ll sort of push yourself to the other side a little. It’s a better solution than any checking during the lean action, since I’m assuming the player may try to hold a lean stance and then walk up to a wall later (you’ll need that extra collision space).

I don’t know if I am too late, but to fix problem #1, disable Use Controller View Rotation on the camera component, then head over to the “Defaults” tab, search “Use Controller” or go to the Pawn category, and check Use Controller Rotation Yaw & Use Controller Rotation Pitch. :slight_smile: