Skip to content

Follow Camera Implementation Preferences #37

@rhelsing

Description

@rhelsing

I would love to help contribute a toggleable follow camera option (like mario / uncharted) - when the player does not provide look direction input for X seconds, the camera autofollows the player direction. I have implemented this in a separate project, but would like to know if there is a preferred way you would like me to approach this for this project.

General approach in my other project:

  1. visible variable follow_camera, default to false on CameraController
  2. mouse_has_not_been_touched variable, set to false
  3. Timer on camera controller, set to 2 seconds, on timeout, sets mouse_has_not_been_touched to true
  4. when mouse input is detected sets mouse_has_not_been_touched to false and starts the timer

In player script, when follow camera is on and _camera_controler.mouse_has_not_been_touched and player is_moving, (not aiming), have the camera follow the player.

Screen Shot 2024-02-27 at 3 41 39 PM

Please let me know objections/considerations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions