NavigationObstacle3D

package
v0.0.0-...-d9f4d4e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 9, 2025 License: MIT Imports: 22 Imported by: 0

Documentation

Overview

Package NavigationObstacle3D provides methods for working with NavigationObstacle3D object instances.

Index

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 Any

type Any interface {
	gd.IsClass
	AsNavigationObstacle3D() Instance
}

type Instance

type Instance [1]gdclass.NavigationObstacle3D

An obstacle needs a navigation map and outline [member vertices] defined to work correctly. The outlines can not cross or overlap and are restricted to a plane projection. This means the y-axis of the vertices is ignored, instead the obstacle's global y-axis position is used for placement. The projected shape is extruded by the obstacles height along the y-axis. 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, e.g. inside "solid" geometry or on top of it. 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 New

func New() Instance

func (Instance) AffectNavigationMesh

func (self Instance) AffectNavigationMesh() bool

func (Instance) AsNavigationObstacle3D

func (self Instance) AsNavigationObstacle3D() Instance

func (Instance) AsNode

func (self Instance) AsNode() Node.Instance

func (Instance) AsNode3D

func (self Instance) AsNode3D() Node3D.Instance

func (Instance) AsObject

func (self Instance) AsObject() [1]gd.Object

func (Instance) AvoidanceEnabled

func (self Instance) AvoidanceEnabled() bool

func (Instance) AvoidanceLayers

func (self Instance) AvoidanceLayers() int

func (Instance) CarveNavigationMesh

func (self Instance) CarveNavigationMesh() bool

func (Instance) GetAvoidanceLayerValue

func (self Instance) GetAvoidanceLayerValue(layer_number int) bool

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.NavigationMap3D

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.NavigationObstacle3D

Returns the [RID] of this obstacle on the [NavigationServer3D].

func (Instance) Height

func (self Instance) Height() Float.X

func (Instance) Radius

func (self Instance) Radius() Float.X

func (Instance) SetAffectNavigationMesh

func (self Instance) SetAffectNavigationMesh(value bool)

func (Instance) SetAvoidanceEnabled

func (self Instance) SetAvoidanceEnabled(value bool)

func (Instance) SetAvoidanceLayerValue

func (self Instance) SetAvoidanceLayerValue(layer_number int, value bool)

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 (self Instance) SetAvoidanceLayers(value int)

func (Instance) SetCarveNavigationMesh

func (self Instance) SetCarveNavigationMesh(value bool)

func (Instance) SetHeight

func (self Instance) SetHeight(value Float.X)

func (Instance) SetNavigationMap

func (self Instance) SetNavigationMap(navigation_map RID.NavigationMap3D)

Sets the [RID] of the navigation map this NavigationObstacle node should use and also updates the [code]obstacle[/code] on the NavigationServer.

func (Instance) SetRadius

func (self Instance) SetRadius(value Float.X)

func (Instance) SetUse3dAvoidance

func (self Instance) SetUse3dAvoidance(value bool)

func (Instance) SetVelocity

func (self Instance) SetVelocity(value Vector3.XYZ)

func (Instance) SetVertices

func (self Instance) SetVertices(value []Vector3.XYZ)

func (*Instance) UnsafePointer

func (self *Instance) UnsafePointer() unsafe.Pointer

func (Instance) Use3dAvoidance

func (self Instance) Use3dAvoidance() bool

func (Instance) Velocity

func (self Instance) Velocity() Vector3.XYZ

func (Instance) Vertices

func (self Instance) Vertices() []Vector3.XYZ

func (Instance) Virtual

func (self Instance) Virtual(name string) reflect.Value

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL