跳到主要内容

NavigationMesh

继承

Resource

简要描述

描述

成员

类型属性名默认值
floatagent/height2.0
floatagent/max_climb0.9
floatagent/max_slope45.0
floatagent/radius0.6
floatcell/height0.2
floatcell/size0.3
floatdetail/sample_distance6.0
floatdetail/sample_max_error1.0
floatedge/max_error1.3
floatedge/max_length12.0
boolfilter/filter_walkable_low_height_spansfalse
boolfilter/ledge_spansfalse
boolfilter/low_hanging_obstaclesfalse
intgeometry/collision_mask
intgeometry/parsed_geometry_type0
intgeometry/source_geometry_mode0
Stringgeometry/source_group_name
floatpolygon/verts_per_poly6.0
floatregion/merge_size20.0
floatregion/min_size8.0
intsample_partition_type/sample_partition_type0

方法

返回值类型方法名称
voidadd_polygon(polygon: PoolIntArray)
voidclear_polygons()
voidcreate_from_mesh(mesh: Mesh)
boolget_collision_mask_bit(bit: int) const
PoolIntArrayget_polygon(idx: int)
intget_polygon_count() const
PoolVector3Arrayget_vertices() const
voidset_collision_mask_bit(bit: int, value: bool)
voidset_vertices(vertices: PoolVector3Array)

常量

  • **SAMPLE_PARTITION_WATERSHED = 0**
  • **SAMPLE_PARTITION_MONOTONE = 1**
  • **SAMPLE_PARTITION_LAYERS = 2**
  • **PARSED_GEOMETRY_MESH_INSTANCES = 0**
  • **PARSED_GEOMETRY_STATIC_COLLIDERS = 1**
  • **PARSED_GEOMETRY_BOTH = 2**

成员说明

  • float agent/height
Default2.0
setterset_agent_height(value)
getterget_agent_height
  • float agent/max_climb
Default0.9
setterset_agent_max_climb(value)
getterget_agent_max_climb
  • float agent/max_slope
Default45.0
setterset_agent_max_slope(value)
getterget_agent_max_slope
  • float agent/radius
Default0.6
setterset_agent_radius(value)
getterget_agent_radius
  • float cell/height
Default0.2
setterset_cell_height(value)
getterget_cell_height
  • float cell/size
Default0.3
setterset_cell_size(value)
getterget_cell_size
  • float detail/sample_distance
Default6.0
setterset_detail_sample_distance(value)
getterget_detail_sample_distance
  • float detail/sample_max_error
Default1.0
setterset_detail_sample_max_error(value)
getterget_detail_sample_max_error
  • float edge/max_error
Default1.3
setterset_edge_max_error(value)
getterget_edge_max_error
  • float edge/max_length
Default12.0
setterset_edge_max_length(value)
getterget_edge_max_length
  • bool filter/filter_walkable_low_height_spans
Defaultfalse
setterset_filter_walkable_low_height_spans(value)
getterget_filter_walkable_low_height_spans
  • bool filter/ledge_spans
Defaultfalse
setterset_filter_ledge_spans(value)
getterget_filter_ledge_spans
  • bool filter/low_hanging_obstacles
Defaultfalse
setterset_filter_low_hanging_obstacles(value)
getterget_filter_low_hanging_obstacles
  • int geometry/collision_mask
setterset_collision_mask(value)
getterget_collision_mask
  • int geometry/parsed_geometry_type
Default0
setterset_parsed_geometry_type(value)
getterget_parsed_geometry_type
  • int geometry/source_geometry_mode
Default0
setterset_source_geometry_mode(value)
getterget_source_geometry_mode
  • String geometry/source_group_name
setterset_source_group_name(value)
getterget_source_group_name
  • float polygon/verts_per_poly
Default6.0
setterset_verts_per_poly(value)
getterget_verts_per_poly
  • float region/merge_size
Default20.0
setterset_region_merge_size(value)
getterget_region_merge_size
  • float region/min_size
Default8.0
setterset_region_min_size(value)
getterget_region_min_size
  • int sample_partition_type/sample_partition_type
Default0
setterset_sample_partition_type(value)
getterget_sample_partition_type

方法说明

  • add_polygon add_polygon(polygon: PoolIntArray)

  • clear_polygons clear_polygons()

  • create_from_mesh create_from_mesh(mesh: Mesh)

  • get_collision_mask_bit get_collision_mask_bit(bit: int) const

  • get_polygon get_polygon(idx: int)

  • get_polygon_count get_polygon_count() const

  • get_vertices get_vertices() const

  • set_collision_mask_bit set_collision_mask_bit(bit: int, value: bool)

  • set_vertices set_vertices(vertices: PoolVector3Array)