Forum rules - please read before posting.

Custom camera controller

I'm not totally satisfied by the current 3rd person camera.
I wanted to constrain the camera Spin & Pitch to a certain amount. I was glad to find there is an option to do this, but it constraints to global rotation coordinates, independently of player's direction. I wanted a camera :
- That stays behind, aligned with the player
- That lets you rotate 60° on each side (right / left)
- That lets you rotate from 30 to 60° top

image


I thought I could use a custom camera controller, but I don't see how to integrate it without doing some AC engine modification.

Comments

  • Just add the "_Camera" script component to your custom camera (the same object as the actual Unity Camera component itself), and it'll then be visible to your various Actions / Scene Manager fields.
  • Worked like a charm indeed.

    It was 3 steps :
    - Create a Camera specific script (customThirdPersonCamera.cs)
    - Create an editor file (customThirdPersonCameraEditor.cs)
    - Restart Unity. I don't know where the bug came from (Unity or AC) but editor components didn't appear until I restarted.

    Thanks for your answer ! \o/
  • Addendum :
    Your customThirdPersonCameraEditor.cs script needs to be in an "Editor" subfolder or you will have build errors.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.