PhysicsRayQueryParameters3D

package
v0.0.0-...-357ca8a Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2025 License: MIT Imports: 24 Imported by: 0

Documentation

Overview

By changing various properties of this object, such as the ray position, you can configure the parameters for PhysicsDirectSpaceState3D.IntersectRay.

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
	AsPhysicsRayQueryParameters3D() Instance
}

type Extension

type Extension[T gdclass.Interface] struct{ gdclass.Extension[T, Instance] }

Extension can be embedded in a new struct to create an extension of this class. T should be the type that is embedding this Extension

func (*Extension[T]) AsObject

func (self *Extension[T]) AsObject() [1]gd.Object

func (*Extension[T]) AsPhysicsRayQueryParameters3D

func (self *Extension[T]) AsPhysicsRayQueryParameters3D() Instance

func (*Extension[T]) AsRefCounted

func (self *Extension[T]) AsRefCounted() [1]gd.RefCounted

type ID

type ID Object.ID

ID is a typed object ID (reference) to an instance of this class, use it to store references to objects with unknown lifetimes, as an ID will not panic on use if the underlying object has been destroyed.

func (ID) Instance

func (id ID) Instance() (Instance, bool)

type Instance

Instance of the class with convieniently typed arguments and results.

var Nil Instance

Nil is a nil/null instance of the class. Equivalent to the zero value.

func Create

func Create(from Vector3.XYZ, to Vector3.XYZ, exclude [][]RID.Body3D) Instance

Returns a new, pre-configured PhysicsRayQueryParameters3D object. Use it to quickly create query parameters using the most common options.

var query = PhysicsRayQueryParameters3D.Create(node3d.Position(), Vector3.Add(node3d.Position(), Vector3.XYZ{0, -10, 0}), nil)
var collision = node3d.GetWorld3d().DirectSpaceState().IntersectRay(query)

func CreateOptions

func CreateOptions(from Vector3.XYZ, to Vector3.XYZ, collision_mask int, exclude [][]RID.Body3D) Instance

Returns a new, pre-configured PhysicsRayQueryParameters3D object. Use it to quickly create query parameters using the most common options.

var query = PhysicsRayQueryParameters3D.Create(node3d.Position(), Vector3.Add(node3d.Position(), Vector3.XYZ{0, -10, 0}), nil)
var collision = node3d.GetWorld3d().DirectSpaceState().IntersectRay(query)

func New

func New() Instance

func (Instance) AsObject

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

func (Instance) AsPhysicsRayQueryParameters3D

func (self Instance) AsPhysicsRayQueryParameters3D() Instance

func (Instance) AsRefCounted

func (self Instance) AsRefCounted() [1]gd.RefCounted

func (Instance) CollideWithAreas

func (self Instance) CollideWithAreas() bool

If true, the query will take Area3Ds into account.

func (Instance) CollideWithBodies

func (self Instance) CollideWithBodies() bool

If true, the query will take PhysicsBody3Ds into account.

func (Instance) CollisionMask

func (self Instance) CollisionMask() int

The physics layers the query will detect (as a bitmask). By default, all collision layers are detected. See Collision layers and masks in the documentation for more information.

func (Instance) Exclude

func (self Instance) Exclude() [][]RID.Body3D

The list of object Resource.IDs that will be excluded from collisions. Use CollisionObject3D.GetRid to get the Resource.ID associated with a CollisionObject3D-derived node.

Note: The returned array is copied and any changes to it will not update the original property value. To update the value you need to modify the returned array, and then assign it to the property again.

func (Instance) From

func (self Instance) From() Vector3.XYZ

The starting point of the ray being queried for, in global coordinates.

func (Instance) HitBackFaces

func (self Instance) HitBackFaces() bool

If true, the query will hit back faces with concave polygon shapes with back face enabled or heightmap shapes.

func (Instance) HitFromInside

func (self Instance) HitFromInside() bool

If true, the query will detect a hit when starting inside shapes. In this case the collision normal will be Vector3(0, 0, 0). Does not affect concave polygon shapes or heightmap shapes.

func (Instance) ID

func (self Instance) ID() ID

func (Instance) SetCollideWithAreas

func (self Instance) SetCollideWithAreas(value bool)

SetCollideWithAreas sets the property returned by [IsCollideWithAreasEnabled].

func (Instance) SetCollideWithBodies

func (self Instance) SetCollideWithBodies(value bool)

SetCollideWithBodies sets the property returned by [IsCollideWithBodiesEnabled].

func (Instance) SetCollisionMask

func (self Instance) SetCollisionMask(value int)

SetCollisionMask sets the property returned by [GetCollisionMask].

func (Instance) SetExclude

func (self Instance) SetExclude(value [][]RID.Body3D)

SetExclude sets the property returned by [GetExclude].

func (Instance) SetFrom

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

SetFrom sets the property returned by [GetFrom].

func (Instance) SetHitBackFaces

func (self Instance) SetHitBackFaces(value bool)

SetHitBackFaces sets the property returned by [IsHitBackFacesEnabled].

func (Instance) SetHitFromInside

func (self Instance) SetHitFromInside(value bool)

SetHitFromInside sets the property returned by [IsHitFromInsideEnabled].

func (*Instance) SetObject

func (self *Instance) SetObject(obj [1]gd.Object) bool

func (Instance) SetTo

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

SetTo sets the property returned by [GetTo].

func (Instance) To

func (self Instance) To() Vector3.XYZ

The ending point of the ray being queried for, in global coordinates.

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