Documentation
¶
Overview ¶
This class extends graphics.gd/classdb/PhysicsServer2D by providing additional virtual methods that can be overridden. When these methods are overridden, they will be called instead of the internal methods of the physics server.
Intended for use with GDExtension to create custom implementations of graphics.gd/classdb/PhysicsServer2D.
Index ¶
- type Advanced
- type Any
- type Extension
- type ID
- type Implementation
- type Instance
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) AsPhysicsServer2DExtension() Instance
- func (self Instance) BodyTestMotionIsExcludingBody(body RID.Body2D) bool
- func (self Instance) BodyTestMotionIsExcludingObject(obj int) bool
- func (self Instance) ID() ID
- func (self *Instance) SetObject(obj [1]gd.Object) bool
- func (self Instance) Virtual(name string) reflect.Value
- type Interface
- type MotionResult
- type RayResult
- type ShapeRestInfo
- type ShapeResult
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]See Interface for methods that can be overridden by T.
func (*Extension[T]) AsPhysicsServer2DExtension ¶
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 Implementation ¶
type Implementation = implementation
Implementation implements Interface with empty methods.
type Instance ¶
type Instance [1]gdclass.PhysicsServer2DExtension
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) AsPhysicsServer2DExtension ¶
func (Instance) BodyTestMotionIsExcludingBody ¶
Returns true if the body with the given [Resource.ID] is being excluded from [Interface.BodyTestMotion]. See also graphics.gd/classdb/Object.Instance.GetInstanceId.
func (Instance) BodyTestMotionIsExcludingObject ¶
Returns true if the object with the given instance ID is being excluded from [Interface.BodyTestMotion]. See also graphics.gd/classdb/Object.Instance.GetInstanceId.
type Interface ¶
type Interface interface { // Overridable version of [graphics.gd/classdb/PhysicsServer2D.WorldBoundaryShapeCreate]. WorldBoundaryShapeCreate() RID.Shape2D // Overridable version of [graphics.gd/classdb/PhysicsServer2D.SeparationRayShapeCreate]. SeparationRayShapeCreate() RID.Shape2D // Overridable version of [graphics.gd/classdb/PhysicsServer2D.SegmentShapeCreate]. SegmentShapeCreate() RID.Shape2D // Overridable version of [graphics.gd/classdb/PhysicsServer2D.CircleShapeCreate]. CircleShapeCreate() RID.Shape2D // Overridable version of [graphics.gd/classdb/PhysicsServer2D.RectangleShapeCreate]. RectangleShapeCreate() RID.Shape2D // Overridable version of [graphics.gd/classdb/PhysicsServer2D.CapsuleShapeCreate]. CapsuleShapeCreate() RID.Shape2D // Overridable version of [graphics.gd/classdb/PhysicsServer2D.ConvexPolygonShapeCreate]. ConvexPolygonShapeCreate() RID.Shape2D // Overridable version of [graphics.gd/classdb/PhysicsServer2D.ConcavePolygonShapeCreate]. ConcavePolygonShapeCreate() RID.Shape2D // Overridable version of [graphics.gd/classdb/PhysicsServer2D.ShapeSetData]. ShapeSetData(shape RID.Shape2D, data any) // Should set the custom solver bias for the given 'shape'. It defines how much bodies are forced to separate on contact. // // Overridable version of [graphics.gd/classdb/PhysicsServer2D]'s internal shape_get_custom_solver_bias method. Corresponds to [graphics.gd/classdb/Shape2D.Instance.CustomSolverBias]. ShapeSetCustomSolverBias(shape RID.Shape2D, bias Float.X) // Overridable version of [graphics.gd/classdb/PhysicsServer2D.ShapeGetType]. ShapeGetType(shape RID.Shape2D) PhysicsServer2D.ShapeType // Overridable version of [graphics.gd/classdb/PhysicsServer2D.ShapeGetData]. ShapeGetData(shape RID.Shape2D) any // Should return the custom solver bias of the given 'shape', which defines how much bodies are forced to separate on contact when this shape is involved. // // Overridable version of [graphics.gd/classdb/PhysicsServer2D]'s internal shape_get_custom_solver_bias method. Corresponds to [graphics.gd/classdb/Shape2D.Instance.CustomSolverBias]. ShapeGetCustomSolverBias(shape RID.Shape2D) Float.X // Given two shapes and their parameters, should return true if a collision between the two would occur, with additional details passed in 'results'. // // Overridable version of [graphics.gd/classdb/PhysicsServer2D]'s internal shape_collide method. Corresponds to [graphics.gd/classdb/PhysicsDirectSpaceState2D.Instance.CollideShape]. ShapeCollide(shape_A RID.Shape2D, xform_A Transform2D.OriginXY, motion_A Vector2.XY, shape_B RID.Shape2D, xform_B Transform2D.OriginXY, motion_B Vector2.XY, results gdextension.Pointer, result_max int, result_count *int32) bool // Overridable version of [graphics.gd/classdb/PhysicsServer2D.SpaceCreate]. SpaceCreate() RID.Space2D // Overridable version of [graphics.gd/classdb/PhysicsServer2D.SpaceSetActive]. SpaceSetActive(space RID.Space2D, active bool) // Overridable version of [graphics.gd/classdb/PhysicsServer2D.SpaceIsActive]. SpaceIsActive(space RID.Space2D) bool // Overridable version of [graphics.gd/classdb/PhysicsServer2D.SpaceSetParam]. SpaceSetParam(space RID.Space2D, param PhysicsServer2D.SpaceParameter, value Float.X) // Overridable version of [graphics.gd/classdb/PhysicsServer2D.SpaceGetParam]. SpaceGetParam(space RID.Space2D, param PhysicsServer2D.SpaceParameter) Float.X // Overridable version of [graphics.gd/classdb/PhysicsServer2D.SpaceGetDirectState]. SpaceGetDirectState(space RID.Space2D) PhysicsDirectSpaceState2D.Instance // Used internally to allow the given 'space' to store contact points, up to 'max_contacts'. This is automatically set for the main [graphics.gd/classdb/World2D]'s space when [graphics.gd/classdb/SceneTree.Instance.DebugCollisionsHint] is true, or by checking "Visible Collision Shapes" in the editor. Only works in debug builds. // // Overridable version of [graphics.gd/classdb/PhysicsServer2D]'s internal space_set_debug_contacts method. SpaceSetDebugContacts(space RID.Space2D, max_contacts int) // Should return the positions of all contacts that have occurred during the last physics step in the given 'space'. See also [Interface.SpaceGetContactCount] and [Interface.SpaceSetDebugContacts]. // // Overridable version of [graphics.gd/classdb/PhysicsServer2D]'s internal space_get_contacts method. SpaceGetContacts(space RID.Space2D) []Vector2.XY // Should return how many contacts have occurred during the last physics step in the given 'space'. See also [Interface.SpaceGetContacts] and [Interface.SpaceSetDebugContacts]. // // Overridable version of [graphics.gd/classdb/PhysicsServer2D]'s internal space_get_contact_count method. SpaceGetContactCount(space RID.Space2D) int // Overridable version of [graphics.gd/classdb/PhysicsServer2D.AreaCreate]. AreaCreate() RID.Area2D // Overridable version of [graphics.gd/classdb/PhysicsServer2D.AreaSetSpace]. AreaSetSpace(area RID.Area2D, space RID.Space2D) // Overridable version of [graphics.gd/classdb/PhysicsServer2D.AreaGetSpace]. AreaGetSpace(area RID.Area2D) RID.Space2D // Overridable version of [graphics.gd/classdb/PhysicsServer2D.AreaAddShape]. AreaAddShape(area RID.Area2D, shape RID.Shape2D, transform Transform2D.OriginXY, disabled bool) // Overridable version of [graphics.gd/classdb/PhysicsServer2D.AreaSetShape]. AreaSetShape(area RID.Area2D, shape_idx int, shape RID.Shape2D) // Overridable version of [graphics.gd/classdb/PhysicsServer2D.AreaSetShapeTransform]. AreaSetShapeTransform(area RID.Area2D, shape_idx int, transform Transform2D.OriginXY) // Overridable version of [graphics.gd/classdb/PhysicsServer2D.AreaSetShapeDisabled]. AreaSetShapeDisabled(area RID.Area2D, shape_idx int, disabled bool) // Overridable version of [graphics.gd/classdb/PhysicsServer2D.AreaGetShapeCount]. AreaGetShapeCount(area RID.Area2D) int // Overridable version of [graphics.gd/classdb/PhysicsServer2D.AreaGetShape]. AreaGetShape(area RID.Area2D, shape_idx int) RID.Area2D // Overridable version of [graphics.gd/classdb/PhysicsServer2D.AreaGetShapeTransform]. AreaGetShapeTransform(area RID.Area2D, shape_idx int) Transform2D.OriginXY // Overridable version of [graphics.gd/classdb/PhysicsServer2D.AreaRemoveShape]. AreaRemoveShape(area RID.Area2D, shape_idx int) // Overridable version of [graphics.gd/classdb/PhysicsServer2D.AreaClearShapes]. AreaClearShapes(area RID.Area2D) // Overridable version of [graphics.gd/classdb/PhysicsServer2D.AreaAttachObjectInstanceId]. AreaAttachObjectInstanceId(area RID.Area2D, id int) // Overridable version of [graphics.gd/classdb/PhysicsServer2D.AreaGetObjectInstanceId]. AreaGetObjectInstanceId(area RID.Area2D) int // Overridable version of [graphics.gd/classdb/PhysicsServer2D.AreaAttachCanvasInstanceId]. AreaAttachCanvasInstanceId(area RID.Area2D, id int) // Overridable version of [graphics.gd/classdb/PhysicsServer2D.AreaGetCanvasInstanceId]. AreaGetCanvasInstanceId(area RID.Area2D) int // Overridable version of [graphics.gd/classdb/PhysicsServer2D.AreaSetParam]. AreaSetParam(area RID.Area2D, param PhysicsServer2D.AreaParameter, value any) // Overridable version of [graphics.gd/classdb/PhysicsServer2D.AreaSetTransform]. AreaSetTransform(area RID.Area2D, transform Transform2D.OriginXY) // Overridable version of [graphics.gd/classdb/PhysicsServer2D.AreaGetParam]. AreaGetParam(area RID.Area2D, param PhysicsServer2D.AreaParameter) any // Overridable version of [graphics.gd/classdb/PhysicsServer2D.AreaGetTransform]. AreaGetTransform(area RID.Area2D) Transform2D.OriginXY // Overridable version of [graphics.gd/classdb/PhysicsServer2D.AreaSetCollisionLayer]. AreaSetCollisionLayer(area RID.Area2D, layer int) // Overridable version of [graphics.gd/classdb/PhysicsServer2D.AreaGetCollisionLayer]. AreaGetCollisionLayer(area RID.Area2D) int // Overridable version of [graphics.gd/classdb/PhysicsServer2D.AreaSetCollisionMask]. AreaSetCollisionMask(area RID.Area2D, mask int) // Overridable version of [graphics.gd/classdb/PhysicsServer2D.AreaGetCollisionMask]. AreaGetCollisionMask(area RID.Area2D) int // Overridable version of [graphics.gd/classdb/PhysicsServer2D.AreaSetMonitorable]. AreaSetMonitorable(area RID.Area2D, monitorable bool) // If set to true, allows the area with the given [Resource.ID] to detect mouse inputs when the mouse cursor is hovering on it. // // Overridable version of [graphics.gd/classdb/PhysicsServer2D]'s internal area_set_pickable method. Corresponds to [graphics.gd/classdb/CollisionObject2D.Instance.InputPickable]. AreaSetPickable(area RID.Area2D, pickable bool) // Overridable version of [graphics.gd/classdb/PhysicsServer2D.AreaSetMonitorCallback]. AreaSetMonitorCallback(area RID.Area2D, callback func(status int, body_rid RID.Any, instance_id Object.ID, body_shape_idx int, self_shape_idx int)) // Overridable version of [graphics.gd/classdb/PhysicsServer2D.AreaSetAreaMonitorCallback]. AreaSetAreaMonitorCallback(area RID.Area2D, callback func(status int, body_rid RID.Any, instance_id Object.ID, body_shape_idx int, self_shape_idx int)) // Overridable version of [graphics.gd/classdb/PhysicsServer2D.BodyCreate]. BodyCreate() RID.Body2D // Overridable version of [graphics.gd/classdb/PhysicsServer2D.BodySetSpace]. BodySetSpace(body RID.Body2D, space RID.Space2D) // Overridable version of [graphics.gd/classdb/PhysicsServer2D.BodyGetSpace]. BodyGetSpace(body RID.Body2D) RID.Space2D // Overridable version of [graphics.gd/classdb/PhysicsServer2D.BodySetMode]. BodySetMode(body RID.Body2D, mode PhysicsServer2D.BodyMode) // Overridable version of [graphics.gd/classdb/PhysicsServer2D.BodyGetMode]. BodyGetMode(body RID.Body2D) PhysicsServer2D.BodyMode // Overridable version of [graphics.gd/classdb/PhysicsServer2D.BodyAddShape]. BodyAddShape(body RID.Body2D, shape RID.Shape2D, transform Transform2D.OriginXY, disabled bool) // Overridable version of [graphics.gd/classdb/PhysicsServer2D.BodySetShape]. BodySetShape(body RID.Body2D, shape_idx int, shape RID.Shape2D) // Overridable version of [graphics.gd/classdb/PhysicsServer2D.BodySetShapeTransform]. BodySetShapeTransform(body RID.Body2D, shape_idx int, transform Transform2D.OriginXY) // Overridable version of [graphics.gd/classdb/PhysicsServer2D.BodyGetShapeCount]. BodyGetShapeCount(body RID.Body2D) int // Overridable version of [graphics.gd/classdb/PhysicsServer2D.BodyGetShape]. BodyGetShape(body RID.Body2D, shape_idx int) RID.Body2D // Overridable version of [graphics.gd/classdb/PhysicsServer2D.BodyGetShapeTransform]. BodyGetShapeTransform(body RID.Body2D, shape_idx int) Transform2D.OriginXY // Overridable version of [graphics.gd/classdb/PhysicsServer2D.BodySetShapeDisabled]. BodySetShapeDisabled(body RID.Body2D, shape_idx int, disabled bool) // Overridable version of [graphics.gd/classdb/PhysicsServer2D.BodySetShapeAsOneWayCollision]. BodySetShapeAsOneWayCollision(body RID.Body2D, shape_idx int, enable bool, margin Float.X) // Overridable version of [graphics.gd/classdb/PhysicsServer2D.BodyRemoveShape]. BodyRemoveShape(body RID.Body2D, shape_idx int) // Overridable version of [graphics.gd/classdb/PhysicsServer2D.BodyClearShapes]. BodyClearShapes(body RID.Body2D) // Overridable version of [graphics.gd/classdb/PhysicsServer2D.BodyAttachObjectInstanceId]. BodyAttachObjectInstanceId(body RID.Body2D, id int) // Overridable version of [graphics.gd/classdb/PhysicsServer2D.BodyGetObjectInstanceId]. BodyGetObjectInstanceId(body RID.Body2D) int // Overridable version of [graphics.gd/classdb/PhysicsServer2D.BodyAttachCanvasInstanceId]. BodyAttachCanvasInstanceId(body RID.Body2D, id int) // Overridable version of [graphics.gd/classdb/PhysicsServer2D.BodyGetCanvasInstanceId]. BodyGetCanvasInstanceId(body RID.Body2D) int // Overridable version of [graphics.gd/classdb/PhysicsServer2D.BodySetContinuousCollisionDetectionMode]. BodySetContinuousCollisionDetectionMode(body RID.Body2D, mode PhysicsServer2D.CCDMode) // Overridable version of [graphics.gd/classdb/PhysicsServer2D.BodyGetContinuousCollisionDetectionMode]. BodyGetContinuousCollisionDetectionMode(body RID.Body2D) PhysicsServer2D.CCDMode // Overridable version of [graphics.gd/classdb/PhysicsServer2D.BodySetCollisionLayer]. BodySetCollisionLayer(body RID.Body2D, layer int) // Overridable version of [graphics.gd/classdb/PhysicsServer2D.BodyGetCollisionLayer]. BodyGetCollisionLayer(body RID.Body2D) int // Overridable version of [graphics.gd/classdb/PhysicsServer2D.BodySetCollisionMask]. BodySetCollisionMask(body RID.Body2D, mask int) // Overridable version of [graphics.gd/classdb/PhysicsServer2D.BodyGetCollisionMask]. BodyGetCollisionMask(body RID.Body2D) int // Overridable version of [graphics.gd/classdb/PhysicsServer2D.BodySetCollisionPriority]. BodySetCollisionPriority(body RID.Body2D, priority Float.X) // Overridable version of [graphics.gd/classdb/PhysicsServer2D.BodyGetCollisionPriority]. BodyGetCollisionPriority(body RID.Body2D) Float.X // Overridable version of [graphics.gd/classdb/PhysicsServer2D.BodySetParam]. BodySetParam(body RID.Body2D, param PhysicsServer2D.BodyParameter, value any) // Overridable version of [graphics.gd/classdb/PhysicsServer2D.BodyGetParam]. BodyGetParam(body RID.Body2D, param PhysicsServer2D.BodyParameter) any // Overridable version of [graphics.gd/classdb/PhysicsServer2D.BodyResetMassProperties]. BodyResetMassProperties(body RID.Body2D) // Overridable version of [graphics.gd/classdb/PhysicsServer2D.BodySetState]. BodySetState(body RID.Body2D, state PhysicsServer2D.BodyState, value any) // Overridable version of [graphics.gd/classdb/PhysicsServer2D.BodyGetState]. BodyGetState(body RID.Body2D, state PhysicsServer2D.BodyState) any // Overridable version of [graphics.gd/classdb/PhysicsServer2D.BodyApplyCentralImpulse]. BodyApplyCentralImpulse(body RID.Body2D, impulse Vector2.XY) // Overridable version of [graphics.gd/classdb/PhysicsServer2D.BodyApplyTorqueImpulse]. BodyApplyTorqueImpulse(body RID.Body2D, impulse Float.X) // Overridable version of [graphics.gd/classdb/PhysicsServer2D.BodyApplyImpulse]. BodyApplyImpulse(body RID.Body2D, impulse Vector2.XY, position Vector2.XY) // Overridable version of [graphics.gd/classdb/PhysicsServer2D.BodyApplyCentralForce]. BodyApplyCentralForce(body RID.Body2D, force Vector2.XY) // Overridable version of [graphics.gd/classdb/PhysicsServer2D.BodyApplyForce]. BodyApplyForce(body RID.Body2D, force Vector2.XY, position Vector2.XY) // Overridable version of [graphics.gd/classdb/PhysicsServer2D.BodyApplyTorque]. BodyApplyTorque(body RID.Body2D, torque Float.X) // Overridable version of [graphics.gd/classdb/PhysicsServer2D.BodyAddConstantCentralForce]. BodyAddConstantCentralForce(body RID.Body2D, force Vector2.XY) // Overridable version of [graphics.gd/classdb/PhysicsServer2D.BodyAddConstantForce]. BodyAddConstantForce(body RID.Body2D, force Vector2.XY, position Vector2.XY) // Overridable version of [graphics.gd/classdb/PhysicsServer2D.BodyAddConstantTorque]. BodyAddConstantTorque(body RID.Body2D, torque Float.X) // Overridable version of [graphics.gd/classdb/PhysicsServer2D.BodySetConstantForce]. BodySetConstantForce(body RID.Body2D, force Vector2.XY) // Overridable version of [graphics.gd/classdb/PhysicsServer2D.BodyGetConstantForce]. BodyGetConstantForce(body RID.Body2D) Vector2.XY // Overridable version of [graphics.gd/classdb/PhysicsServer2D.BodySetConstantTorque]. BodySetConstantTorque(body RID.Body2D, torque Float.X) // Overridable version of [graphics.gd/classdb/PhysicsServer2D.BodyGetConstantTorque]. BodyGetConstantTorque(body RID.Body2D) Float.X // Overridable version of [graphics.gd/classdb/PhysicsServer2D.BodySetAxisVelocity]. BodySetAxisVelocity(body RID.Body2D, axis_velocity Vector2.XY) // Overridable version of [graphics.gd/classdb/PhysicsServer2D.BodyAddCollisionException]. BodyAddCollisionException(body RID.Body2D, excepted_body RID.Body2D) // Overridable version of [graphics.gd/classdb/PhysicsServer2D.BodyRemoveCollisionException]. BodyRemoveCollisionException(body RID.Body2D, excepted_body RID.Body2D) // Returns the [Resource.ID]s of all bodies added as collision exceptions for the given 'body'. See also [Interface.BodyAddCollisionException] and [Interface.BodyRemoveCollisionException]. // // Overridable version of [graphics.gd/classdb/PhysicsServer2D]'s internal body_get_collision_exceptions method. Corresponds to [graphics.gd/classdb/PhysicsBody2D.Instance.GetCollisionExceptions]. BodyGetCollisionExceptions(body RID.Body2D) []RID.Body2D // Overridable version of [graphics.gd/classdb/PhysicsServer2D.BodySetMaxContactsReported]. BodySetMaxContactsReported(body RID.Body2D, amount int) // Overridable version of [graphics.gd/classdb/PhysicsServer2D.BodyGetMaxContactsReported]. BodyGetMaxContactsReported(body RID.Body2D) int // Overridable version of [graphics.gd/classdb/PhysicsServer2D]'s internal body_set_contacts_reported_depth_threshold method. // // Note: This method is currently unused by Godot's default physics implementation. BodySetContactsReportedDepthThreshold(body RID.Body2D, threshold Float.X) // Overridable version of [graphics.gd/classdb/PhysicsServer2D]'s internal body_get_contacts_reported_depth_threshold method. // // Note: This method is currently unused by Godot's default physics implementation. BodyGetContactsReportedDepthThreshold(body RID.Body2D) Float.X // Overridable version of [graphics.gd/classdb/PhysicsServer2D.BodySetOmitForceIntegration]. BodySetOmitForceIntegration(body RID.Body2D, enable bool) // Overridable version of [graphics.gd/classdb/PhysicsServer2D.BodyIsOmittingForceIntegration]. BodyIsOmittingForceIntegration(body RID.Body2D) bool // Assigns the 'body' to call the given 'callable' during the synchronization phase of the loop, before [Interface.Step] is called. See also [Interface.Sync]. // // Overridable version of [graphics.gd/classdb/PhysicsServer2D.BodySetStateSyncCallback]. BodySetStateSyncCallback(body RID.Body2D, callable func(state PhysicsDirectBodyState2D.Instance)) // Overridable version of [graphics.gd/classdb/PhysicsServer2D.BodySetForceIntegrationCallback]. BodySetForceIntegrationCallback(body RID.Body2D, callable func(state PhysicsDirectBodyState2D.Instance, userdata any), userdata any) // Given a 'body', a 'shape', and their respective parameters, this method should return true if a collision between the two would occur, with additional details passed in 'results'. // // Overridable version of [graphics.gd/classdb/PhysicsServer2D]'s internal shape_collide method. Corresponds to [graphics.gd/classdb/PhysicsDirectSpaceState2D.Instance.CollideShape]. BodyCollideShape(body RID.Body2D, body_shape int, shape RID.Shape2D, shape_xform Transform2D.OriginXY, motion Vector2.XY, results gdextension.Pointer, result_max int, result_count *int32) bool // If set to true, allows the body with the given [Resource.ID] to detect mouse inputs when the mouse cursor is hovering on it. // // Overridable version of [graphics.gd/classdb/PhysicsServer2D]'s internal body_set_pickable method. Corresponds to [graphics.gd/classdb/CollisionObject2D.Instance.InputPickable]. BodySetPickable(body RID.Body2D, pickable bool) // Overridable version of [graphics.gd/classdb/PhysicsServer2D.BodyGetDirectState]. BodyGetDirectState(body RID.Body2D) PhysicsDirectBodyState2D.Instance // Overridable version of [graphics.gd/classdb/PhysicsServer2D.BodyTestMotion]. Unlike the exposed implementation, this method does not receive all of the arguments inside a [graphics.gd/classdb/PhysicsTestMotionParameters2D]. BodyTestMotion(body RID.Body2D, from Transform2D.OriginXY, motion Vector2.XY, margin Float.X, collide_separation_ray bool, recovery_as_collision bool, result *MotionResult) bool // Overridable version of [graphics.gd/classdb/PhysicsServer2D.JointCreate]. JointCreate() RID.Joint2D // Overridable version of [graphics.gd/classdb/PhysicsServer2D.JointClear]. JointClear(joint RID.Joint2D) // Overridable version of [graphics.gd/classdb/PhysicsServer2D.JointSetParam]. JointSetParam(joint RID.Joint2D, param PhysicsServer2D.JointParam, value Float.X) // Overridable version of [graphics.gd/classdb/PhysicsServer2D.JointGetParam]. JointGetParam(joint RID.Joint2D, param PhysicsServer2D.JointParam) Float.X // Overridable version of [graphics.gd/classdb/PhysicsServer2D.JointDisableCollisionsBetweenBodies]. JointDisableCollisionsBetweenBodies(joint RID.Joint2D, disable bool) // Overridable version of [graphics.gd/classdb/PhysicsServer2D.JointIsDisabledCollisionsBetweenBodies]. JointIsDisabledCollisionsBetweenBodies(joint RID.Joint2D) bool // Overridable version of [graphics.gd/classdb/PhysicsServer2D.JointMakePin]. JointMakePin(joint RID.Joint2D, anchor Vector2.XY, body_a RID.Body2D, body_b RID.Body2D) // Overridable version of [graphics.gd/classdb/PhysicsServer2D.JointMakeGroove]. JointMakeGroove(joint RID.Joint2D, a_groove1 Vector2.XY, a_groove2 Vector2.XY, b_anchor Vector2.XY, body_a RID.Body2D, body_b RID.Body2D) // Overridable version of [graphics.gd/classdb/PhysicsServer2D.JointMakeDampedSpring]. JointMakeDampedSpring(joint RID.Joint2D, anchor_a Vector2.XY, anchor_b Vector2.XY, body_a RID.Body2D, body_b RID.Body2D) // Overridable version of [graphics.gd/classdb/PhysicsServer2D.PinJointSetFlag]. PinJointSetFlag(joint RID.Joint2D, flag PhysicsServer2D.PinJointFlag, enabled bool) // Overridable version of [graphics.gd/classdb/PhysicsServer2D.PinJointGetFlag]. PinJointGetFlag(joint RID.Joint2D, flag PhysicsServer2D.PinJointFlag) bool // Overridable version of [graphics.gd/classdb/PhysicsServer2D.PinJointSetParam]. PinJointSetParam(joint RID.Joint2D, param PhysicsServer2D.PinJointParam, value Float.X) // Overridable version of [graphics.gd/classdb/PhysicsServer2D.PinJointGetParam]. PinJointGetParam(joint RID.Joint2D, param PhysicsServer2D.PinJointParam) Float.X // Overridable version of [graphics.gd/classdb/PhysicsServer2D.DampedSpringJointSetParam]. DampedSpringJointSetParam(joint RID.Joint2D, param PhysicsServer2D.DampedSpringParam, value Float.X) // Overridable version of [graphics.gd/classdb/PhysicsServer2D.DampedSpringJointGetParam]. DampedSpringJointGetParam(joint RID.Joint2D, param PhysicsServer2D.DampedSpringParam) Float.X // Overridable version of [graphics.gd/classdb/PhysicsServer2D.JointGetType]. JointGetType(joint RID.Joint2D) PhysicsServer2D.JointType // Overridable version of [graphics.gd/classdb/PhysicsServer2D.FreeRid]. FreeRid(rid RID.Any) // Overridable version of [graphics.gd/classdb/PhysicsServer2D.SetActive]. SetActive(active bool) // Called when the main loop is initialized and creates a new instance of this physics server. See also [graphics.gd/classdb/MainLoop.Instance.Initialize] and [Interface.Finish]. // // Overridable version of [graphics.gd/classdb/PhysicsServer2D]'s internal init method. Init() // Called every physics step to process the physics simulation. 'step' is the time elapsed since the last physics step, in seconds. It is usually the same as the value returned by [graphics.gd/classdb/Node.Instance.GetPhysicsProcessDeltaTime]. // // Overridable version of [graphics.gd/classdb/PhysicsServer2D]'s internal step method. Step(step Float.X) // Called to indicate that the physics server is synchronizing and cannot access physics states if running on a separate thread. See also [Interface.EndSync]. // // Overridable version of [graphics.gd/classdb/PhysicsServer2D]'s internal sync method. Sync() // Called every physics step before [Interface.Step] to process all remaining queries. // // Overridable version of [graphics.gd/classdb/PhysicsServer2D]'s internal flush_queries method. FlushQueries() // Called to indicate that the physics server has stopped synchronizing. It is in the loop's iteration/physics phase, and can access physics objects even if running on a separate thread. See also [Interface.Sync]. // // Overridable version of [graphics.gd/classdb/PhysicsServer2D]'s internal end_sync method. EndSync() // Called when the main loop finalizes to shut down the physics server. See also [graphics.gd/classdb/MainLoop.Instance.Finalize] and [Interface.Init]. // // Overridable version of [graphics.gd/classdb/PhysicsServer2D]'s internal finish method. Finish() // Overridable method that should return true when the physics server is processing queries. See also [Interface.FlushQueries]. // // Overridable version of [graphics.gd/classdb/PhysicsServer2D]'s internal is_flushing_queries method. IsFlushingQueries() bool // Overridable version of [graphics.gd/classdb/PhysicsServer2D.GetProcessInfo]. GetProcessInfo(process_info PhysicsServer2D.ProcessInfo) int }
type MotionResult ¶
type MotionResult = gd.PhysicsServer2DExtensionMotionResult
type RayResult ¶
type RayResult = gd.PhysicsServer2DExtensionRayResult
type ShapeRestInfo ¶
type ShapeRestInfo = gd.PhysicsServer2DExtensionShapeRestInfo
type ShapeResult ¶
type ShapeResult = gd.PhysicsServer2DExtensionShapeResult