Documentation
¶
Overview ¶
By changing various properties of this object, such as the shape, you can configure the parameters for PhysicsDirectSpaceState2D's methods.
Index ¶
- type Advanced
- type Any
- type Extension
- type ID
- type Instance
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) AsPhysicsShapeQueryParameters2D() Instance
- func (self Instance) AsRefCounted() [1]gd.RefCounted
- func (self Instance) CollideWithAreas() bool
- func (self Instance) CollideWithBodies() bool
- func (self Instance) CollisionMask() int
- func (self Instance) Exclude() [][]RID.Body2D
- func (self Instance) ID() ID
- func (self Instance) Margin() Float.X
- func (self Instance) Motion() Vector2.XY
- func (self Instance) SetCollideWithAreas(value bool)
- func (self Instance) SetCollideWithBodies(value bool)
- func (self Instance) SetCollisionMask(value int)
- func (self Instance) SetExclude(value [][]RID.Body2D)
- func (self Instance) SetMargin(value Float.X)
- func (self Instance) SetMotion(value Vector2.XY)
- func (self *Instance) SetObject(obj [1]gd.Object) bool
- func (self Instance) SetShape(value Resource.Instance)
- func (self Instance) SetShapeRid(value RID.Any)
- func (self Instance) SetTransform(value Transform2D.OriginXY)
- func (self Instance) Shape() Resource.Instance
- func (self Instance) ShapeRid() RID.Any
- func (self Instance) Transform() Transform2D.OriginXY
- 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 Extension ¶
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]) AsPhysicsShapeQueryParameters2D ¶
func (*Extension[T]) AsRefCounted ¶
func (self *Extension[T]) AsRefCounted() [1]gd.RefCounted
type 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.
type Instance ¶
type Instance [1]gdclass.PhysicsShapeQueryParameters2D
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 (Instance) AsPhysicsShapeQueryParameters2D ¶
func (Instance) AsRefCounted ¶
func (self Instance) AsRefCounted() [1]gd.RefCounted
func (Instance) CollideWithAreas ¶
If true, the query will take Area2Ds into account.
func (Instance) CollideWithBodies ¶
If true, the query will take PhysicsBody2Ds into account.
func (Instance) CollisionMask ¶
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 ¶
The list of object Resource.IDs that will be excluded from collisions. Use CollisionObject2D.GetRid to get the Resource.ID associated with a CollisionObject2D-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) SetCollideWithAreas ¶
SetCollideWithAreas sets the property returned by [IsCollideWithAreasEnabled].
func (Instance) SetCollideWithBodies ¶
SetCollideWithBodies sets the property returned by [IsCollideWithBodiesEnabled].
func (Instance) SetCollisionMask ¶
SetCollisionMask sets the property returned by [GetCollisionMask].
func (Instance) SetExclude ¶
SetExclude sets the property returned by [GetExclude].
func (Instance) SetShapeRid ¶
SetShapeRid sets the property returned by [GetShapeRid].
func (Instance) SetTransform ¶
func (self Instance) SetTransform(value Transform2D.OriginXY)
SetTransform sets the property returned by [GetTransform].
func (Instance) Shape ¶
The Shape2D that will be used for collision/intersection queries. This stores the actual reference which avoids the shape to be released while being used for queries, so always prefer using this over ShapeRid.
func (Instance) ShapeRid ¶
The queried shape's Resource.ID that will be used for collision/intersection queries. Use this over Shape if you want to optimize for performance using the Servers API:
func (Instance) Transform ¶
func (self Instance) Transform() Transform2D.OriginXY
The queried shape's transform matrix.