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

Parsed Collision Mask for a NavigationPolygon displays PROPERTY_HINT_LAYERS_3D_PHYSICS instead of PROPERTY_HINT_LAYERS_2D_PHYSICS #88154

Closed
DaZang opened this issue Feb 9, 2024 · 0 comments · Fixed by #88156

Comments

@DaZang
Copy link
Contributor

DaZang commented Feb 9, 2024

Tested versions

v4.2.1.stable.official [b09f793]

System information

Godot v4.2.1.stable - Windows 10.0.19045 - GLES3 (Compatibility) - NVIDIA GeForce RTX 2060 (NVIDIA; 31.0.15.3179) - Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz (12 Threads)

Issue description

In the inspector for a NavigationPolygon in a NavigationRegion2d node the hints for 3D physics layers are displayed in the Parsed Collision Mask attribute.
As the 2D physics layers are used to scan for colliders anyways, It would be expected to show hints for the 2D physics layers instead of 3D physics layers.

The issue seems to be with this line (on master-branch):

ADD_PROPERTY(PropertyInfo(Variant::INT, "parsed_collision_mask", PROPERTY_HINT_LAYERS_3D_PHYSICS), "set_parsed_collision_mask", "get_parsed_collision_mask");

I will try to create a fix myself.

Steps to reproduce

  1. Create a New Project
  2. In the project settings: Layer Names -> 2D Physics: give layer 1 the name "2d_layer_1"
    grafik
  3. In 3D Physics: give layer 1 the name "3d_layer_1"
  4. In 2d Editor create Root Node: 2D Scene
  5. Append a New Node: NavigationRegion2D
  6. In the Inspector of the NavigationRegion2D create a new Navigation Polygon
  7. Expand the Navigation Polygon and hover layer 1of the parsed Collision Mask property
    grafik
    "3d_layer_1" is displayed
    Expected behavior would be that "2d_layer_1" is displayed.

Minimal reproduction project (MRP)

N/A

@AThousandShips AThousandShips added this to the 4.3 milestone Feb 9, 2024
akien-mga pushed a commit to akien-mga/godot that referenced this issue Mar 11, 2024
In NavigationPolygon use PROPERTY_HINT_LAYERS_2D_PHYSICS instead of PROPERTY_HINT_LAYERS_3D_PHYSICS to display the correct property hints.

Fixes godotengine#88154.

(cherry picked from commit 0831ea0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants