Download

Correct way to create a sitting camera

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:

  1. 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.

  2. 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?

Easiest is perhaps enabling input on the sofa and its camera:
https://docs.unrealengine.com/latest/INT/Gameplay/HowTo/ActorInput/Blueprints/

Thanks for reply!

I tried this, but it doesn’t respond;
sofa_sitting.PNG

What have I missed?

I still don’t get how to make this work. I’ve tried to create a Pawn-type blueprint but now I’m getting: EnableInput can only be specified on a Pawn for its Controller

Edit
Solution is to set “Possess” on this pawn then do the same stuff