Documentation ¶
Overview ¶
Package NavigationObstacle2D provides methods for working with NavigationObstacle2D object instances.
Index ¶
- type Advanced
- type Any
- type Instance
- func (self Instance) AffectNavigationMesh() bool
- func (self Instance) AsCanvasItem() CanvasItem.Instance
- func (self Instance) AsNavigationObstacle2D() Instance
- func (self Instance) AsNode() Node.Instance
- func (self Instance) AsNode2D() Node2D.Instance
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) AvoidanceEnabled() bool
- func (self Instance) AvoidanceLayers() int
- func (self Instance) CarveNavigationMesh() bool
- func (self Instance) GetAvoidanceLayerValue(layer_number int) bool
- func (self Instance) GetNavigationMap() RID.NavigationMap2D
- func (self Instance) GetRid() RID.NavigationObstacle2D
- func (self Instance) Radius() Float.X
- func (self Instance) SetAffectNavigationMesh(value bool)
- func (self Instance) SetAvoidanceEnabled(value bool)
- func (self Instance) SetAvoidanceLayerValue(layer_number int, value bool)
- func (self Instance) SetAvoidanceLayers(value int)
- func (self Instance) SetCarveNavigationMesh(value bool)
- func (self Instance) SetNavigationMap(navigation_map RID.NavigationMap2D)
- func (self Instance) SetRadius(value Float.X)
- func (self Instance) SetVelocity(value Vector2.XY)
- func (self Instance) SetVertices(value []Vector2.XY)
- func (self *Instance) UnsafePointer() unsafe.Pointer
- func (self Instance) Velocity() Vector2.XY
- func (self Instance) Vertices() []Vector2.XY
- func (self Instance) Virtual(name string) reflect.Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Advanced ¶
type Advanced = class
Advanced exposes a 1:1 low-level instance of the class, undocumented, for those who know what they are doing.
type Instance ¶
type Instance [1]gdclass.NavigationObstacle2D
An obstacle needs a navigation map and outline [member vertices] defined to work correctly. The outlines can not cross or overlap. Obstacles can be included in the navigation mesh baking process when [member affect_navigation_mesh] is enabled. They do not add walkable geometry, instead their role is to discard other source geometry inside the shape. This can be used to prevent navigation mesh from appearing in unwanted places. If [member carve_navigation_mesh] is enabled the baked shape will not be affected by offsets of the navigation mesh baking, e.g. the agent radius. With [member avoidance_enabled] the obstacle can constrain the avoidance velocities of avoidance using agents. If the obstacle's vertices are wound in clockwise order, avoidance agents will be pushed in by the obstacle, otherwise, avoidance agents will be pushed out. Obstacles using vertices and avoidance can warp to a new position but should not be moved every single frame as each change requires a rebuild of the avoidance map.
var Nil Instance
Nil is a nil/null instance of the class. Equivalent to the zero value.
func (Instance) AffectNavigationMesh ¶
func (Instance) AsCanvasItem ¶
func (self Instance) AsCanvasItem() CanvasItem.Instance
func (Instance) AsNavigationObstacle2D ¶
func (Instance) AvoidanceEnabled ¶
func (Instance) AvoidanceLayers ¶
func (Instance) CarveNavigationMesh ¶
func (Instance) GetAvoidanceLayerValue ¶
Returns whether or not the specified layer of the [member avoidance_layers] bitmask is enabled, given a [param layer_number] between 1 and 32.
func (Instance) GetNavigationMap ¶
func (self Instance) GetNavigationMap() RID.NavigationMap2D
Returns the [RID] of the navigation map for this NavigationObstacle node. This function returns always the map set on the NavigationObstacle node and not the map of the abstract obstacle on the NavigationServer. If the obstacle map is changed directly with the NavigationServer API the NavigationObstacle node will not be aware of the map change. Use [method set_navigation_map] to change the navigation map for the NavigationObstacle and also update the obstacle on the NavigationServer.
func (Instance) GetRid ¶
func (self Instance) GetRid() RID.NavigationObstacle2D
Returns the [RID] of this obstacle on the [NavigationServer2D].
func (Instance) SetAffectNavigationMesh ¶
func (Instance) SetAvoidanceEnabled ¶
func (Instance) SetAvoidanceLayerValue ¶
Based on [param value], enables or disables the specified layer in the [member avoidance_layers] bitmask, given a [param layer_number] between 1 and 32.
func (Instance) SetAvoidanceLayers ¶
func (Instance) SetCarveNavigationMesh ¶
func (Instance) SetNavigationMap ¶
func (self Instance) SetNavigationMap(navigation_map RID.NavigationMap2D)
Sets the [RID] of the navigation map this NavigationObstacle node should use and also updates the [code]obstacle[/code] on the NavigationServer.