Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting a Pcam's Cull Mask Layer using Helper Function #204

Closed
ramokz opened this issue Jan 30, 2024 · 0 comments · Fixed by #205
Closed

Setting a Pcam's Cull Mask Layer using Helper Function #204

ramokz opened this issue Jan 30, 2024 · 0 comments · Fixed by #205

Comments

@ramokz
Copy link
Owner

ramokz commented Jan 30, 2024

Project Type

3D

Feature Description

From #202

The way you assign a cull mask to a PCam3D is by using the function set_camera_cull_mask(value: int).

The challenge with this is that you have to assign the bit value, which requires calculating the power of the layer you wish to change on top of the existing cull mask value, which isn't very straightforward — especially for beginners.

Godot's Camera3D class provides a helper function for this with set_cull_mask_value(layer_number: int, enabled: bool), which simplifies the process of modifying the cull mask by just saying which layer to change and then whether to enable or disable them.

The proposal is to duplicate that same helper function into the PCam3D as well.

Use Cases

For when you want to adjust a PCam's, and in turn a Camera3D's, cull mask during runtime.

Importance

Low - there are workarounds where the proposed feature would just simplify things

Usage

Often - a significant amount of projects can find this useful

(Optional) Proposed Solution

No response

@ramokz ramokz linked a pull request Jan 31, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant