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

Vcamera trigger action #21

Merged
merged 2 commits into from
May 31, 2022

Conversation

aXu-AP
Copy link
Contributor

@aXu-AP aXu-AP commented May 29, 2022

New proposal for modifying VCamera when object enters trigger area.
Compared to #18 this has different approach:

  • Instead of inheriting Area, it is a Node that gets placed under Area node.
    • This enables user to add multiple actions for single area.
    • Also this feels more Godot-y way of doing things 😄
    • Has warning in editor if it's not child of Area.
  • Has different action types: enabling, changing priority or group.
  • Can have different action on enter and exit.
    • Can set different priority.
    • Can be used as one-way action if you select Nothing as one of the actions.
  • Can filter objects by group.
    • This is useful if player character doesn't have own collision layer, you can specify it with group.
    • Also for differentiating players in splitscreen games (I might update the splitscreen example to showcase this).

My only question is, is VCameras folder right place for this? Or should it be directly in root (virtualcamera)? I'm not sure what is planned for VCameras folder, as there's currently only one type of VCamera.

@aXu-AP aXu-AP mentioned this pull request May 29, 2022
Copy link
Owner

@BtheDestroyer BtheDestroyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe some day we'll get a better system than _get_property_list()...

@BtheDestroyer BtheDestroyer merged commit aca3c43 into BtheDestroyer:main May 31, 2022
@aXu-AP
Copy link
Contributor Author

aXu-AP commented May 31, 2022

Maybe some day we'll get a better system than _get_property_list()...

It does take up large portion of this script just for the sake of hiding a few unnecessary variables 😄 . But it must be hard for Godot devs to thread the line between making export options versatile while simple to use. And I'm happy that they gave the option to do customizing to such degree with _get_property_list. Inspector plugin being even more versatile option, but property list's advantage is being available even without turning any plugins on.

@aXu-AP aXu-AP deleted the vcamera-trigger-action branch May 31, 2022 06:30
@aXu-AP aXu-AP mentioned this pull request May 31, 2022
@BtheDestroyer
Copy link
Owner

I'm hoping GDScript 2 in Godot 4 will get better support through the new attribute feature.

Unity has great inspector support through C#'s attributes (super easy and concise to use and extremely customizable).

@aXu-AP
Copy link
Contributor Author

aXu-AP commented May 31, 2022

I never really did get into Unity so I can't say alot about that... But following attributes (annotations I believe is the term for GDScript) would be good to have: @export_if(condition) and @export_category("Group Name"). I found some related proposals, maybe you want to 👍 them: godotengine/godot-proposals#1056, godotengine/godot-proposals#1255.

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 this pull request may close these issues.

2 participants