Skip to content

Add boundaryEnclosesCameraOnly property #601

@m10

Description

@m10

Is your feature request related to a problem? Please describe.

I need to enclose the camera position inside a box to prevent collisions with objects and limit movement but I want to allow the target to be outside the box. This feels like better usability espacially with smaller boxes.
The object of interest is outside the box.

Describe the solution you'd like

Add a new property boundaryEnclosesCameraOnly or similar to constrain the camea position only and allow the target to be outside.

Describe alternatives you've considered

I tried to extend the CameraControls to implement it but i am not familiar enough with the logic and the code in general.
As a workaround i use box3.clampPoint(camera.position, camera.position) on update but feels hacky and does not follow the friction logic, cameracontrols is out of sinc(?)

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions