PhysicsTestMotionResult2D

package
v0.0.0-...-ae8aae0 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2025 License: MIT Imports: 19 Imported by: 0

Documentation

Overview

Package PhysicsTestMotionResult2D provides methods for working with PhysicsTestMotionResult2D 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
	AsPhysicsTestMotionResult2D() Instance
}

type Instance

Describes the motion and collision result from [method PhysicsServer2D.body_test_motion].

var Nil Instance

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

func New

func New() Instance

func (Instance) AsObject

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

func (Instance) AsPhysicsTestMotionResult2D

func (self Instance) AsPhysicsTestMotionResult2D() Instance

func (Instance) AsRefCounted

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

func (Instance) GetCollider

func (self Instance) GetCollider() Object.Instance

Returns the colliding body's attached [Object], if a collision occurred.

func (Instance) GetColliderId

func (self Instance) GetColliderId() int

Returns the unique instance ID of the colliding body's attached [Object], if a collision occurred. See [method Object.get_instance_id].

func (Instance) GetColliderRid

func (self Instance) GetColliderRid() RID.Body2D

Returns the colliding body's [RID] used by the [PhysicsServer2D], if a collision occurred.

func (Instance) GetColliderShape

func (self Instance) GetColliderShape() int

Returns the colliding body's shape index, if a collision occurred. See [CollisionObject2D].

func (Instance) GetColliderVelocity

func (self Instance) GetColliderVelocity() Vector2.XY

Returns the colliding body's velocity, if a collision occurred.

func (Instance) GetCollisionDepth

func (self Instance) GetCollisionDepth() Float.X

Returns the length of overlap along the collision normal, if a collision occurred.

func (Instance) GetCollisionLocalShape

func (self Instance) GetCollisionLocalShape() int

Returns the moving object's colliding shape, if a collision occurred.

func (Instance) GetCollisionNormal

func (self Instance) GetCollisionNormal() Vector2.XY

Returns the colliding body's shape's normal at the point of collision, if a collision occurred.

func (Instance) GetCollisionPoint

func (self Instance) GetCollisionPoint() Vector2.XY

Returns the point of collision in global coordinates, if a collision occurred.

func (Instance) GetCollisionSafeFraction

func (self Instance) GetCollisionSafeFraction() Float.X

Returns the maximum fraction of the motion that can occur without a collision, between [code]0[/code] and [code]1[/code].

func (Instance) GetCollisionUnsafeFraction

func (self Instance) GetCollisionUnsafeFraction() Float.X

Returns the minimum fraction of the motion needed to collide, if a collision occurred, between [code]0[/code] and [code]1[/code].

func (Instance) GetRemainder

func (self Instance) GetRemainder() Vector2.XY

Returns the moving object's remaining movement vector.

func (Instance) GetTravel

func (self Instance) GetTravel() Vector2.XY

Returns the moving object's travel before collision.

func (*Instance) UnsafePointer

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

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