I have various chairs, sofas etc. and I want the player to be able to sit down on them and move the camera while sitting (only rotation, not xyz movement). I can limit the movement using Set pitch/yaw max/min on the camera manager to ensure the player can’t rotate 360 degrees etc.
I’ve tried two different ways of doing this and I run into problems with both:
Having a “sitting” camera in my sofa/chair blueprint which I assign to the player using “Set View Target with Blend”.
Issue: I’m not able to control or rotate the camera. I have set “Use pawn control rotation”, but I suppose this doesn’t work because the camera still belongs to the sofa blueprint and not the playercontroller / pawn that has movement input events.
Moving the Pawn Camera using SetWorldLocation
Issue: The player capsule collides with the sofa. The player capsule needs to be in a specific position (above the sofa) in order for me to change the camera location without the pawn glitching (it collides with the sofa, messing up the rotation).
I prefer method 1) because with this I have to make sure that I disable/enable collision to not mess up the capsule and I have to re-set the camera to original position when the player rises again.
What is the best way to go about this?