PhysicsServer Methods |
The PhysicsServer type exposes the following members.
Name | Description | |
---|---|---|
AreaAddShape | Adds a shape to the area, along with a transform matrix. Shapes are usually referenced by their index, so you should track which shape has a given index. | |
AreaAttachObjectInstanceId | Assigns the area to a descendant of Object, so it can exist in the node tree. | |
AreaClearShapes | Removes all shapes from an area. It does not delete the shapes, so they can be reassigned later. | |
AreaCreate | Creates an Area. | |
AreaGetObjectInstanceId | Gets the instance ID of the object the area is assigned to. | |
AreaGetParam | Returns an area parameter value. A list of available parameters is on the PhysicsServerAreaParameter constants. | |
AreaGetShape | Returns the RID of the nth shape of an area. | |
AreaGetShapeCount | Returns the number of shapes assigned to an area. | |
AreaGetShapeTransform | Returns the transform matrix of a shape within an area. | |
AreaGetSpace | Returns the space assigned to the area. | |
AreaGetSpaceOverrideMode | Returns the space override mode for the area. | |
AreaGetTransform | Returns the transform matrix for an area. | |
AreaIsRayPickable | If true, area collides with rays. | |
AreaRemoveShape | Removes a shape from an area. It does not delete the shape, so it can be reassigned later. | |
AreaSetAreaMonitorCallback | ||
AreaSetCollisionLayer | Assigns the area to one or many physics layers. | |
AreaSetCollisionMask | Sets which physics layers the area will monitor. | |
AreaSetMonitorable | ||
AreaSetMonitorCallback | Sets the function to call when any body/area enters or exits the area. This callback will be called for any object interacting with the area, and takes five parameters: 1: or , depending on whether the object entered or exited the area. 2: RID of the object that entered/exited the area. 3: Instance ID of the object that entered/exited the area. 4: The shape index of the object that entered/exited the area. 5: The shape index of the area where the object entered/exited. | |
AreaSetParam | Sets the value for an area parameter. A list of available parameters is on the PhysicsServerAreaParameter constants. | |
AreaSetRayPickable | Sets object pickable with rays. | |
AreaSetShape | Substitutes a given area shape by another. The old shape is selected by its index, the new one by its RID. | |
AreaSetShapeDisabled | ||
AreaSetShapeTransform | Sets the transform matrix for an area shape. | |
AreaSetSpace | Assigns a space to the area. | |
AreaSetSpaceOverrideMode | Sets the space override mode for the area. The modes are described in the PhysicsServerAreaSpaceOverrideMode constants. | |
AreaSetTransform | Sets the transform matrix for an area. | |
BodyAddCentralForce | ||
BodyAddCollisionException | Adds a body to the list of bodies exempt from collisions. | |
BodyAddForce | ||
BodyAddShape | Adds a shape to the body, along with a transform matrix. Shapes are usually referenced by their index, so you should track which shape has a given index. | |
BodyAddTorque | ||
BodyApplyCentralImpulse | ||
BodyApplyImpulse | Gives the body a push at a position in the direction of the impulse. | |
BodyApplyTorqueImpulse | Gives the body a push to rotate it. | |
BodyAttachObjectInstanceId | Assigns the area to a descendant of Object, so it can exist in the node tree. | |
BodyClearShapes | Removes all shapes from a body. | |
BodyCreate | Creates a physics body. The first parameter can be any value from PhysicsServerBodyMode constants, for the type of body created. Additionally, the body can be created in sleeping state to save processing time. | |
BodyGetCollisionLayer | Returns the physics layer or layers a body belongs to. | |
BodyGetCollisionMask | Returns the physics layer or layers a body can collide with. - | |
BodyGetDirectState | Returns the PhysicsDirectBodyState of the body. | |
BodyGetKinematicSafeMargin | ||
BodyGetMaxContactsReported | Returns the maximum contacts that can be reported. See BodySetMaxContactsReported(RID, Int32). | |
BodyGetMode | Returns the body mode. | |
BodyGetObjectInstanceId | Gets the instance ID of the object the area is assigned to. | |
BodyGetParam | Returns the value of a body parameter. A list of available parameters is on the PhysicsServerBodyParameter constants. | |
BodyGetShape | Returns the RID of the nth shape of a body. | |
BodyGetShapeCount | Returns the number of shapes assigned to a body. | |
BodyGetShapeTransform | Returns the transform matrix of a body shape. | |
BodyGetSpace | Returns the RID of the space assigned to a body. | |
BodyGetState | Returns a body state. | |
BodyIsAxisLocked | ||
BodyIsContinuousCollisionDetectionEnabled | If true, the continuous collision detection mode is enabled. | |
BodyIsOmittingForceIntegration | Returns whether a body uses a callback function to calculate its own physics (see BodySetForceIntegrationCallback(RID, Object, String, Object)). | |
BodyIsRayPickable | If true, the body can be detected by rays. | |
BodyRemoveCollisionException | Removes a body from the list of bodies exempt from collisions. Continuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided. | |
BodyRemoveShape | Removes a shape from a body. The shape is not deleted, so it can be reused afterwards. | |
BodySetAxisLock | ||
BodySetAxisVelocity | Sets an axis velocity. The velocity in the given vector axis will be set as the given vector length. This is useful for jumping behavior. | |
BodySetCollisionLayer | Sets the physics layer or layers a body belongs to. | |
BodySetCollisionMask | Sets the physics layer or layers a body can collide with. | |
BodySetEnableContinuousCollisionDetection | If true, the continuous collision detection mode is enabled. Continuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided. | |
BodySetForceIntegrationCallback | Sets the function used to calculate physics for an object, if that object allows it (see BodySetOmitForceIntegration(RID, Boolean)). | |
BodySetKinematicSafeMargin | ||
BodySetMaxContactsReported | Sets the maximum contacts to report. Bodies can keep a log of the contacts with other bodies, this is enabled by setting the maximum amount of contacts reported to a number greater than 0. | |
BodySetMode | Sets the body mode, from one of the PhysicsServerBodyMode constants. | |
BodySetOmitForceIntegration | Sets whether a body uses a callback function to calculate its own physics (see BodySetForceIntegrationCallback(RID, Object, String, Object)). | |
BodySetParam | Sets a body parameter. A list of available parameters is on the PhysicsServerBodyParameter constants. | |
BodySetRayPickable | Sets the body pickable with rays if enabled is set. | |
BodySetShape | Substitutes a given body shape by another. The old shape is selected by its index, the new one by its RID. | |
BodySetShapeDisabled | ||
BodySetShapeTransform | Sets the transform matrix for a body shape. | |
BodySetSpace | Assigns a space to the body (see SpaceCreate). | |
BodySetState | Sets a body state (see PhysicsServerBodyState constants). | |
ConeTwistJointGetParam | Gets a cone_twist_joint parameter (see PhysicsServerConeTwistJointParam constants). | |
ConeTwistJointSetParam | Sets a cone_twist_joint parameter (see PhysicsServerConeTwistJointParam constants). | |
FreeRid | Destroys any of the objects created by PhysicsServer. If the RID passed is not one of the objects that can be created by PhysicsServer, an error will be sent to the console. | |
Generic6dofJointGetFlag | Gets a generic_6_DOF_joint flag (see PhysicsServerG6DOFJointAxisFlag constants). | |
Generic6dofJointGetParam | Gets a generic_6_DOF_joint parameter (see PhysicsServerG6DOFJointAxisParam constants). | |
Generic6dofJointSetFlag | Sets a generic_6_DOF_joint flag (see PhysicsServerG6DOFJointAxisFlag constants). | |
Generic6dofJointSetParam | Sets a generic_6_DOF_joint parameter (see PhysicsServerG6DOFJointAxisParam constants). | |
GetProcessInfo | Returns an Info defined by the PhysicsServerProcessInfo input given. | |
HingeJointGetFlag | Gets a hinge_joint flag (see PhysicsServerHingeJointFlag constants). | |
HingeJointGetParam | Gets a hinge_joint parameter (see PhysicsServerHingeJointParam). | |
HingeJointSetFlag | Sets a hinge_joint flag (see PhysicsServerHingeJointFlag constants). | |
HingeJointSetParam | Sets a hinge_joint parameter (see PhysicsServerHingeJointParam constants). | |
JointCreateConeTwist | Creates a ConeTwistJoint. | |
JointCreateGeneric6dof | Creates a Generic6DOFJoint. | |
JointCreateHinge | Creates a HingeJoint. | |
JointCreatePin | Creates a PinJoint. | |
JointCreateSlider | Creates a SliderJoint. | |
JointGetSolverPriority | Gets the priority value of the Joint. | |
JointGetType | Returns the type of the Joint. | |
JointSetSolverPriority | Sets the priority value of the Joint. | |
PinJointGetLocalA | Returns position of the joint in the local space of body a of the joint. | |
PinJointGetLocalB | Returns position of the joint in the local space of body b of the joint. | |
PinJointGetParam | Gets a pin_joint parameter (see PhysicsServerPinJointParam constants). | |
PinJointSetLocalA | Sets position of the joint in the local space of body a of the joint. | |
PinJointSetLocalB | Sets position of the joint in the local space of body b of the joint. | |
PinJointSetParam | Sets a pin_joint parameter (see PhysicsServerPinJointParam constants). | |
SetActive | Activates or deactivates the 3D physics engine. | |
ShapeCreate | Creates a shape of a type from PhysicsServerShapeType. Does not assign it to a body or an area. To do so, you must use AreaSetShape(RID, Int32, RID) or BodySetShape(RID, Int32, RID). | |
ShapeGetData | Returns the shape data. | |
ShapeGetType | Returns the type of shape (see PhysicsServerShapeType constants). | |
ShapeSetData | Sets the shape data that defines its shape and size. The data to be passed depends on the kind of shape created ShapeGetType(RID). | |
SliderJointGetParam | Gets a slider_joint parameter (see PhysicsServerSliderJointParam constants). | |
SliderJointSetParam | Gets a slider_joint parameter (see PhysicsServerSliderJointParam constants). | |
SpaceCreate | Creates a space. A space is a collection of parameters for the physics engine that can be assigned to an area or a body. It can be assigned to an area with AreaSetSpace(RID, RID), or to a body with BodySetSpace(RID, RID). | |
SpaceGetDirectState | Returns the state of a space, a PhysicsDirectSpaceState. This object can be used to make collision/intersection queries. | |
SpaceGetParam | Returns the value of a space parameter. | |
SpaceIsActive | Returns whether the space is active. | |
SpaceSetActive | Marks a space as active. It will not have an effect, unless it is assigned to an area or body. | |
SpaceSetParam | Sets the value for a space parameter. A list of available parameters is on the PhysicsServerSpaceParameter constants. |