PhysicsServer3D
Hereda: Object
Heredado por: PhysicsServer3DExtension
Una interfaz de servidor para el acceso de bajo nivel a la física 3D.
Descripción
PhysicsServer3D is the server responsible for all 3D physics. It can directly create and manipulate all physics objects:
A space is a self-contained world for a physics simulation. It contains bodies, areas, and joints. Its state can be queried for collision and intersection information, and several parameters of the simulation can be modified.
A shape is a geometric shape such as a sphere, a box, a cylinder, or a polygon. It can be used for collision detection by adding it to a body/area, possibly with an extra transformation relative to the body/area's origin. Bodies/areas can have multiple (transformed) shapes added to them, and a single shape can be added to bodies/areas multiple times with different local transformations.
A body is a physical object which can be in static, kinematic, or rigid mode. Its state (such as position and velocity) can be queried and updated. A force integration callback can be set to customize the body's physics.
An area is a region in space which can be used to detect bodies and areas entering and exiting it. A body monitoring callback can be set to report entering/exiting body shapes, and similarly an area monitoring callback can be set. Gravity and damping can be overridden within the area by setting area parameters.
A joint is a constraint, either between two bodies or on one body relative to a point. Parameters such as the joint bias and the rest length of a spring joint can be adjusted.
Physics objects in PhysicsServer3D may be created and manipulated independently; they do not have to be tied to nodes in the scene tree.
Note: All the 3D physics nodes use the physics server internally. Adding a physics node to the scene tree will cause a corresponding physics object to be created in the physics server. A rigid body node registers a callback that updates the node's transform with the transform of the respective body object in the physics server (every physics update). An area node registers a callback to inform the area node about overlaps with the respective area object in the physics server. The raycast node queries the direct state of the relevant space in the physics server.
Métodos
Enumeraciones
enum JointType: 🔗
JointType JOINT_TYPE_PIN = 0
El Joint3D es un PinJoint3D.
JointType JOINT_TYPE_HINGE = 1
El Joint3D es un HingeJoint3D.
JointType JOINT_TYPE_SLIDER = 2
El Joint3D es un SliderJoint3D.
JointType JOINT_TYPE_CONE_TWIST = 3
El Joint3D es un ConeTwistJoint3D.
JointType JOINT_TYPE_6DOF = 4
El Joint3D es un Generic6DOFJoint3D.
JointType JOINT_TYPE_MAX = 5
Representa el tamaño del enum JointType.
enum PinJointParam: 🔗
PinJointParam PIN_JOINT_BIAS = 0
La fuerza con la que los objetos clavados tratan de mantenerse en relación posicional entre sí.
Cuanto más alto, más fuerte.
PinJointParam PIN_JOINT_DAMPING = 1
La fuerza con la que los objetos clavados tratan de mantenerse en relación posicional entre sí.
Cuanto más alto, más fuerte.
PinJointParam PIN_JOINT_IMPULSE_CLAMP = 2
If above 0, this value is the maximum value for an impulse that this Joint3D puts on its ends.
enum HingeJointParam: 🔗
HingeJointParam HINGE_JOINT_BIAS = 0
La velocidad con la que los dos cuerpos se juntan cuando se mueven en diferentes direcciones.
HingeJointParam HINGE_JOINT_LIMIT_UPPER = 1
La máxima rotación a través de la Hinge.
HingeJointParam HINGE_JOINT_LIMIT_LOWER = 2
La máxima rotación a través de la Hinge.
HingeJointParam HINGE_JOINT_LIMIT_BIAS = 3
La velocidad con la que se corrige la rotación a través del eje perpendicular a la bisagra.
HingeJointParam HINGE_JOINT_LIMIT_SOFTNESS = 4
There is currently no description for this enum. Please help us by contributing one!
HingeJointParam HINGE_JOINT_LIMIT_RELAXATION = 5
Cuanto más bajo es este valor, más se ralentiza la rotación.
HingeJointParam HINGE_JOINT_MOTOR_TARGET_VELOCITY = 6
Velocidad objetivo para el motor.
HingeJointParam HINGE_JOINT_MOTOR_MAX_IMPULSE = 7
Aceleración máxima para el motor.
enum HingeJointFlag: 🔗
HingeJointFlag HINGE_JOINT_FLAG_USE_LIMIT = 0
Si es true, la Hinge tiene una rotación máxima y una mínima.
HingeJointFlag HINGE_JOINT_FLAG_ENABLE_MOTOR = 1
If true, a motor turns the Hinge.
enum SliderJointParam: 🔗
SliderJointParam SLIDER_JOINT_LINEAR_LIMIT_UPPER = 0
La máxima diferencia entre los puntos de pivote en su eje X antes de que se produzca la amortiguación.
SliderJointParam SLIDER_JOINT_LINEAR_LIMIT_LOWER = 1
La diferencia mínima entre los puntos de pivote en su eje X antes de que se produzca la amortiguación.
SliderJointParam SLIDER_JOINT_LINEAR_LIMIT_SOFTNESS = 2
Un factor aplicado al movimiento a través del eje del deslizador una vez que se superan los límites. Cuanto más bajo, más lento es el movimiento.
SliderJointParam SLIDER_JOINT_LINEAR_LIMIT_RESTITUTION = 3
El monto de la restitución una vez que se superen los límites. Cuanto más bajo, más energía de velocidad se pierde.
SliderJointParam SLIDER_JOINT_LINEAR_LIMIT_DAMPING = 4
La cantidad de amortiguación una vez que se superan los límites del deslizador.
SliderJointParam SLIDER_JOINT_LINEAR_MOTION_SOFTNESS = 5
Un factor aplicado al movimiento a través del eje del deslizador mientras el deslizador esté en los límites. Cuanto más bajo, más lento es el movimiento.
SliderJointParam SLIDER_JOINT_LINEAR_MOTION_RESTITUTION = 6
La cantidad de restitución dentro de los límites del deslizador.
SliderJointParam SLIDER_JOINT_LINEAR_MOTION_DAMPING = 7
La cantidad de amortiguación dentro de los límites del deslizador.
SliderJointParam SLIDER_JOINT_LINEAR_ORTHOGONAL_SOFTNESS = 8
Un factor aplicado al movimiento a través de ejes ortogonales al deslizador.
SliderJointParam SLIDER_JOINT_LINEAR_ORTHOGONAL_RESTITUTION = 9
La cantidad de restitución cuando el movimiento es a través de ejes ortogonales al deslizador.
SliderJointParam SLIDER_JOINT_LINEAR_ORTHOGONAL_DAMPING = 10
La cantidad de amortiguación cuando el movimiento es a través de ejes ortogonales al deslizador.
SliderJointParam SLIDER_JOINT_ANGULAR_LIMIT_UPPER = 11
El límite superior de rotación en el deslizador.
SliderJointParam SLIDER_JOINT_ANGULAR_LIMIT_LOWER = 12
El límite inferior de rotación en el deslizador.
SliderJointParam SLIDER_JOINT_ANGULAR_LIMIT_SOFTNESS = 13
Un factor que se aplica a toda la rotación una vez superado el límite.
SliderJointParam SLIDER_JOINT_ANGULAR_LIMIT_RESTITUTION = 14
La cantidad de restitución de la rotación cuando se supera el límite.
SliderJointParam SLIDER_JOINT_ANGULAR_LIMIT_DAMPING = 15
La cantidad de amortiguación de la rotación cuando se supera el límite.
SliderJointParam SLIDER_JOINT_ANGULAR_MOTION_SOFTNESS = 16
Un factor que se aplica a toda la rotación en los límites.
SliderJointParam SLIDER_JOINT_ANGULAR_MOTION_RESTITUTION = 17
La cantidad de restitución de la rotación en los límites.
SliderJointParam SLIDER_JOINT_ANGULAR_MOTION_DAMPING = 18
La cantidad de amortiguación de la rotación en los límites.
SliderJointParam SLIDER_JOINT_ANGULAR_ORTHOGONAL_SOFTNESS = 19
Un factor que se aplica a toda la rotación a través de ejes ortogonales al deslizador.
SliderJointParam SLIDER_JOINT_ANGULAR_ORTHOGONAL_RESTITUTION = 20
La cantidad de restitución de la rotación a través de ejes ortogonales al deslizador.
SliderJointParam SLIDER_JOINT_ANGULAR_ORTHOGONAL_DAMPING = 21
La cantidad de amortiguación de la rotación a través de ejes ortogonales al deslizador.
SliderJointParam SLIDER_JOINT_MAX = 22
Representa el tamaño del enum SliderJointParam.
enum ConeTwistJointParam: 🔗
ConeTwistJointParam CONE_TWIST_JOINT_SWING_SPAN = 0
Swing is rotation from side to side, around the axis perpendicular to the twist axis.
The swing span defines, how much rotation will not get corrected along the swing axis.
Could be defined as looseness in the ConeTwistJoint3D.
If below 0.05, this behavior is locked.
ConeTwistJointParam CONE_TWIST_JOINT_TWIST_SPAN = 1
La torsión es la rotación alrededor del eje de la torsión, este valor definió cuán lejos puede torcerse la articulación.
La torsión se bloquea si está por debajo de 0,05.
ConeTwistJointParam CONE_TWIST_JOINT_BIAS = 2
La velocidad con la que se producirá la oscilación o la torsión.
Cuanto más alto, más rápido.
ConeTwistJointParam CONE_TWIST_JOINT_SOFTNESS = 3
The ease with which the Joint3D twists, if it's too low, it takes more force to twist the joint.
ConeTwistJointParam CONE_TWIST_JOINT_RELAXATION = 4
Define cuán rápido se sincroniza la diferencia de velocidad de giro en ambos lados.
enum G6DOFJointAxisParam: 🔗
G6DOFJointAxisParam G6DOF_JOINT_LINEAR_LOWER_LIMIT = 0
La diferencia mínima entre los puntos de pivote de sus ejes.
G6DOFJointAxisParam G6DOF_JOINT_LINEAR_UPPER_LIMIT = 1
La diferencia máxima entre los puntos de pivote de sus ejes.
G6DOFJointAxisParam G6DOF_JOINT_LINEAR_LIMIT_SOFTNESS = 2
Un factor que se aplica al movimiento a través de los ejes. Cuanto más bajo, más lento es el movimiento.
G6DOFJointAxisParam G6DOF_JOINT_LINEAR_RESTITUTION = 3
La cantidad de restitución en el movimiento de los ejes. Cuanto más bajo, más energía de velocidad se pierde.
G6DOFJointAxisParam G6DOF_JOINT_LINEAR_DAMPING = 4
La cantidad de amortiguación que ocurre en el movimiento lineal a través de los ejes.
G6DOFJointAxisParam G6DOF_JOINT_LINEAR_MOTOR_TARGET_VELOCITY = 5
La velocidad que el motor lineal de la articulación intentará alcanzar.
G6DOFJointAxisParam G6DOF_JOINT_LINEAR_MOTOR_FORCE_LIMIT = 6
La máxima fuerza que el motor lineal puede aplicar mientras intenta alcanzar la velocidad objetivo.
G6DOFJointAxisParam G6DOF_JOINT_LINEAR_SPRING_STIFFNESS = 7
There is currently no description for this enum. Please help us by contributing one!
G6DOFJointAxisParam G6DOF_JOINT_LINEAR_SPRING_DAMPING = 8
There is currently no description for this enum. Please help us by contributing one!
G6DOFJointAxisParam G6DOF_JOINT_LINEAR_SPRING_EQUILIBRIUM_POINT = 9
There is currently no description for this enum. Please help us by contributing one!
G6DOFJointAxisParam G6DOF_JOINT_ANGULAR_LOWER_LIMIT = 10
La rotación mínima en dirección negativa para soltarse y girar alrededor de los ejes.
G6DOFJointAxisParam G6DOF_JOINT_ANGULAR_UPPER_LIMIT = 11
La rotación mínima en dirección positiva para soltarse y girar alrededor de los ejes.
G6DOFJointAxisParam G6DOF_JOINT_ANGULAR_LIMIT_SOFTNESS = 12
Un factor que se multiplica en todas las rotaciones a través de los ejes.
G6DOFJointAxisParam G6DOF_JOINT_ANGULAR_DAMPING = 13
La cantidad de amortiguación rotacional en los ejes. Cuanto menor sea, mayor será el amortiguación.
G6DOFJointAxisParam G6DOF_JOINT_ANGULAR_RESTITUTION = 14
La cantidad de amortiguación rotacional a través de los ejes. Cuanto más bajo, más amortiguación se produce.
G6DOFJointAxisParam G6DOF_JOINT_ANGULAR_FORCE_LIMIT = 15
La máxima cantidad de fuerza que puede ocurrir, al girar alrededor de los ejes.
G6DOFJointAxisParam G6DOF_JOINT_ANGULAR_ERP = 16
Cuando se corrige el cruce de límites en la rotación a través de los ejes, este factor de tolerancia al error define cuánto se ralentiza la corrección. Cuanto más bajo, más lento.
G6DOFJointAxisParam G6DOF_JOINT_ANGULAR_MOTOR_TARGET_VELOCITY = 17
La velocidad del objetivo para el motor en los ejes.
G6DOFJointAxisParam G6DOF_JOINT_ANGULAR_MOTOR_FORCE_LIMIT = 18
Aceleración máxima para el motor en los ejes.
G6DOFJointAxisParam G6DOF_JOINT_ANGULAR_SPRING_STIFFNESS = 19
There is currently no description for this enum. Please help us by contributing one!
G6DOFJointAxisParam G6DOF_JOINT_ANGULAR_SPRING_DAMPING = 20
There is currently no description for this enum. Please help us by contributing one!
G6DOFJointAxisParam G6DOF_JOINT_ANGULAR_SPRING_EQUILIBRIUM_POINT = 21
There is currently no description for this enum. Please help us by contributing one!
G6DOFJointAxisParam G6DOF_JOINT_MAX = 22
Representa el tamaño del enum G6DOFJointAxisParam.
enum G6DOFJointAxisFlag: 🔗
G6DOFJointAxisFlag G6DOF_JOINT_FLAG_ENABLE_LINEAR_LIMIT = 0
If set, linear motion is possible within the given limits.
G6DOFJointAxisFlag G6DOF_JOINT_FLAG_ENABLE_ANGULAR_LIMIT = 1
Si se configura, es posible el movimiento de rotación.
G6DOFJointAxisFlag G6DOF_JOINT_FLAG_ENABLE_ANGULAR_SPRING = 2
There is currently no description for this enum. Please help us by contributing one!
G6DOFJointAxisFlag G6DOF_JOINT_FLAG_ENABLE_LINEAR_SPRING = 3
There is currently no description for this enum. Please help us by contributing one!
G6DOFJointAxisFlag G6DOF_JOINT_FLAG_ENABLE_MOTOR = 4
If set, there is a rotational motor across these axes.
G6DOFJointAxisFlag G6DOF_JOINT_FLAG_ENABLE_LINEAR_MOTOR = 5
If set, there is a linear motor on this axis that targets a specific velocity.
G6DOFJointAxisFlag G6DOF_JOINT_FLAG_MAX = 6
Representa el tamaño del enum G6DOFJointAxisFlag.
enum ShapeType: 🔗
ShapeType SHAPE_WORLD_BOUNDARY = 0
La Shape3D es una WorldBoundaryShape3D.
ShapeType SHAPE_SEPARATION_RAY = 1
La Shape3D es un SeparationRayShape3D.
ShapeType SHAPE_SPHERE = 2
La Shape3D es una SphereShape3D.
ShapeType SHAPE_BOX = 3
La Shape3D es una BoxShape3D.
ShapeType SHAPE_CAPSULE = 4
La Shape3D es una CapsuleShape3D.
ShapeType SHAPE_CYLINDER = 5
La Shape3D es una CylinderShape3D.
ShapeType SHAPE_CONVEX_POLYGON = 6
La Shape3D es una ConvexPolygonShape3D.
ShapeType SHAPE_CONCAVE_POLYGON = 7
La Shape3D es una ConcavePolygonShape3D.
ShapeType SHAPE_HEIGHTMAP = 8
El Shape3D es una HeightMapShape3D.
ShapeType SHAPE_SOFT_BODY = 9
The Shape3D is used internally for a soft body. Any attempt to create this kind of shape results in an error.
ShapeType SHAPE_CUSTOM = 10
Esta constante es utilizada internamente por el motor. Cualquier intento de crear este tipo de forma resulta en un error.
enum AreaParameter: 🔗
AreaParameter AREA_PARAM_GRAVITY_OVERRIDE_MODE = 0
Constant to set/get gravity override mode in an area. See AreaSpaceOverrideMode for possible values.
AreaParameter AREA_PARAM_GRAVITY = 1
Constante para establecer/obtener la fuerza de gravedad en un área.
AreaParameter AREA_PARAM_GRAVITY_VECTOR = 2
Constante para establecer/obtener el vector/centro de gravedad en un área.
AreaParameter AREA_PARAM_GRAVITY_IS_POINT = 3
Constante para establecer/obtener si el vector de gravedad de un área es una dirección, o un punto central.
AreaParameter AREA_PARAM_GRAVITY_POINT_UNIT_DISTANCE = 4
Constant to set/get the distance at which the gravity strength is equal to the gravity controlled by AREA_PARAM_GRAVITY. For example, on a planet 100 meters in radius with a surface gravity of 4.0 m/s², set the gravity to 4.0 and the unit distance to 100.0. The gravity will have falloff according to the inverse square law, so in the example, at 200 meters from the center the gravity will be 1.0 m/s² (twice the distance, 1/4th the gravity), at 50 meters it will be 16.0 m/s² (half the distance, 4x the gravity), and so on.
The above is true only when the unit distance is a positive number. When this is set to 0.0, the gravity will be constant regardless of distance.
AreaParameter AREA_PARAM_LINEAR_DAMP_OVERRIDE_MODE = 5
Constante para establecer/obtener el modo de sobrescritura de la amortiguación lineal en un área. Véase AreaSpaceOverrideMode para los valores posibles.
AreaParameter AREA_PARAM_LINEAR_DAMP = 6
Constante para establecer/obtener el factor de amortiguación lineal de un área.
AreaParameter AREA_PARAM_ANGULAR_DAMP_OVERRIDE_MODE = 7
Constante para establecer/obtener el modo de sobrescritura de la amortiguación angular en un área. Véase AreaSpaceOverrideMode para los valores posibles.
AreaParameter AREA_PARAM_ANGULAR_DAMP = 8
Constante para establecer/obtener el factor de amortiguación angular de un área.
AreaParameter AREA_PARAM_PRIORITY = 9
Constante para establecer/obtener la prioridad (orden de procesamiento) de un área.
AreaParameter AREA_PARAM_WIND_FORCE_MAGNITUDE = 10
Constante para establecer/obtener la magnitud de la fuerza del viento específica del área. Esta fuerza del viento solo se aplica a los nodos SoftBody3D. Otros cuerpos físicos no se ven afectados actualmente por el viento.
AreaParameter AREA_PARAM_WIND_SOURCE = 11
Constante para establecer/obtener el vector 3D que especifica el origen desde el que sopla un viento específico del área.
AreaParameter AREA_PARAM_WIND_DIRECTION = 12
Constante para establecer/obtener el vector 3D que especifica la dirección en la que sopla un viento específico del área.
AreaParameter AREA_PARAM_WIND_ATTENUATION_FACTOR = 13
Constante para establecer/obtener la tasa exponencial a la que la fuerza del viento disminuye con la distancia desde su origen.
enum AreaSpaceOverrideMode: 🔗
AreaSpaceOverrideMode AREA_SPACE_OVERRIDE_DISABLED = 0
Esta zona no afecta a la gravedad/humedad. Estas son generalmente áreas que existen sólo para detectar colisiones, y objetos que entran o salen de ellas.
AreaSpaceOverrideMode AREA_SPACE_OVERRIDE_COMBINE = 1
Esta área añade sus valores de gravedad/humedad a lo que se ha calculado hasta ahora. De esta manera, muchas áreas superpuestas pueden combinar su física para hacer efectos interesantes.
AreaSpaceOverrideMode AREA_SPACE_OVERRIDE_COMBINE_REPLACE = 2
Esta área añade sus valores de gravedad/amortiguación a lo que se ha calculado hasta ahora. Luego deja de tener en cuenta el resto de las áreas, incluso la predeterminada.
AreaSpaceOverrideMode AREA_SPACE_OVERRIDE_REPLACE = 3
Esta área reemplaza cualquier gravedad/amortiguación, incluso la predeterminada, y deja de tener en cuenta el resto de las áreas.
AreaSpaceOverrideMode AREA_SPACE_OVERRIDE_REPLACE_COMBINE = 4
Esta área reemplaza cualquier gravedad/amortiguación calculada hasta ahora, pero sigue calculando el resto de las áreas, hasta la predeterminada.
enum BodyMode: 🔗
BodyMode BODY_MODE_STATIC = 0
Constante para cuerpos estáticos. En este modo, un cuerpo solo puede ser movido por el código del usuario y no colisiona con otros cuerpos a lo largo de su trayectoria cuando se mueve.
BodyMode BODY_MODE_KINEMATIC = 1
Constante para cuerpos cinemáticos. En este modo, un cuerpo solo puede ser movido por el código del usuario y colisiona con otros cuerpos a lo largo de su trayectoria.
BodyMode BODY_MODE_RIGID = 2
Constante para cuerpos rígidos. En este modo, un cuerpo puede ser empujado por otros cuerpos y se le aplican fuerzas.
BodyMode BODY_MODE_RIGID_LINEAR = 3
Constante para cuerpos rígidos lineales. En este modo, un cuerpo no puede rotar, y solo su velocidad lineal se ve afectada por fuerzas externas.
enum BodyParameter: 🔗
BodyParameter BODY_PARAM_BOUNCE = 0
Constante para establecer/obtener el factor de rebote de un cuerpo.
BodyParameter BODY_PARAM_FRICTION = 1
Constante para establecer/obtener la fricción de un cuerpo.
BodyParameter BODY_PARAM_MASS = 2
Constante para establecer/obtener la masa de un cuerpo.
BodyParameter BODY_PARAM_INERTIA = 3
Constante para establecer/obtener la inercia de un cuerpo.
BodyParameter BODY_PARAM_CENTER_OF_MASS = 4
Constante para establecer/obtener la posición del centro de masa de un cuerpo en el sistema de coordenadas local del cuerpo.
BodyParameter BODY_PARAM_GRAVITY_SCALE = 5
Constante para establecer/obtener el multiplicador de gravedad de un cuerpo.
BodyParameter BODY_PARAM_LINEAR_DAMP_MODE = 6
Constante para establecer/obtener el modo de amortiguación lineal de un cuerpo. Véase BodyDampMode para los valores posibles.
BodyParameter BODY_PARAM_ANGULAR_DAMP_MODE = 7
Constante para establecer/obtener el modo de amortiguación angular de un cuerpo. Véase BodyDampMode para los valores posibles.
BodyParameter BODY_PARAM_LINEAR_DAMP = 8
Constante para establecer/obtener el factor de amortiguación lineal de un cuerpo.
BodyParameter BODY_PARAM_ANGULAR_DAMP = 9
Constante para establecer/obtener el factor de amortiguación angular de un cuerpo.
BodyParameter BODY_PARAM_MAX = 10
Representa el tamaño del enum BodyParameter.
enum BodyDampMode: 🔗
BodyDampMode BODY_DAMP_MODE_COMBINE = 0
El valor de amortiguación del cuerpo se suma a cualquier valor establecido en las áreas o al valor por defecto.
BodyDampMode BODY_DAMP_MODE_REPLACE = 1
El valor de amortiguación del cuerpo reemplaza cualquier valor establecido en las áreas o al valor por defecto.
enum BodyState: 🔗
BodyState BODY_STATE_TRANSFORM = 0
Constante para establecer/obtener la matriz de transformación de la corriente del cuerpo.
BodyState BODY_STATE_LINEAR_VELOCITY = 1
Constante para establecer/obtener la actual velocidad lineal del cuerpo.
BodyState BODY_STATE_ANGULAR_VELOCITY = 2
Constante para establecer/obtener la actual velocidad angular del cuerpo.
BodyState BODY_STATE_SLEEPING = 3
Constante para dormir/despertar un cuerpo, o para saber si está durmiendo.
BodyState BODY_STATE_CAN_SLEEP = 4
Constante para establecer/obtener si el cuerpo puede dormir.
enum AreaBodyStatus: 🔗
AreaBodyStatus AREA_BODY_ADDED = 0
El valor del primer parámetro y la función de retrollamada de área recibe, cuando un objeto entra en una de sus formas.
AreaBodyStatus AREA_BODY_REMOVED = 1
El valor del primer parámetro y la función de llamada de área recibe, cuando un objeto sale de una de sus formas.
enum ProcessInfo: 🔗
ProcessInfo INFO_ACTIVE_OBJECTS = 0
Constante para obtener el número de objetos que no están durmiendo.
ProcessInfo INFO_COLLISION_PAIRS = 1
Constante para obtener el número de posibles colisiones.
ProcessInfo INFO_ISLAND_COUNT = 2
Constante para obtener el número de regiones espaciales donde podría ocurrir una colisión.
enum SpaceParameter: 🔗
SpaceParameter SPACE_PARAM_CONTACT_RECYCLE_RADIUS = 0
Constante para establecer/obtener la máxima distancia que un par de cuerpos tiene que moverse antes de que su estado de colisión tenga que ser recalculado.
SpaceParameter SPACE_PARAM_CONTACT_MAX_SEPARATION = 1
Constante para establecer/obtener la distancia máxima a la que una forma puede estar de otra antes de que se consideren separadas y se descarte el contacto.
SpaceParameter SPACE_PARAM_CONTACT_MAX_ALLOWED_PENETRATION = 2
Constante para establecer/obtener la máxima distancia que una forma puede penetrar en otra forma antes de que se considere una colisión.
SpaceParameter SPACE_PARAM_CONTACT_DEFAULT_BIAS = 3
Constante para establecer/obtener el sesgo del solucionador predeterminado para todos los contactos físicos. Un sesgo del solucionador es un factor que controla cuánto "rebotan" dos objetos, después de superponerse, para evitar dejarlos en ese estado debido a la imprecisión numérica.
SpaceParameter SPACE_PARAM_BODY_LINEAR_VELOCITY_SLEEP_THRESHOLD = 4
Constante para establecer/obtener el umbral de velocidad lineal de actividad. Un cuerpo marcado como potencialmente inactivo tanto para la velocidad lineal como para la angular será puesto a dormir después del tiempo dado.
SpaceParameter SPACE_PARAM_BODY_ANGULAR_VELOCITY_SLEEP_THRESHOLD = 5
Constante para establecer/obtener el umbral de velocidad angular de actividad. Un cuerpo marcado como potencialmente inactivo tanto para la velocidad lineal como para la angular será puesto a dormir después del tiempo dado.
SpaceParameter SPACE_PARAM_BODY_TIME_TO_SLEEP = 6
Constante para establecer/obtener el tiempo máximo de actividad. Un cuerpo marcado como potencialmente inactivo tanto para la velocidad lineal como para la angular será puesto a dormir después de este tiempo.
SpaceParameter SPACE_PARAM_SOLVER_ITERATIONS = 7
Constante para establecer/obtener el número de iteraciones del solucionador para contactos y restricciones. Cuanto mayor sea el número de iteraciones, más precisas serán las colisiones y las restricciones. Sin embargo, un mayor número de iteraciones requiere más potencia de la CPU, lo que puede disminuir el rendimiento.
enum BodyAxis: 🔗
BodyAxis BODY_AXIS_LINEAR_X = 1
There is currently no description for this enum. Please help us by contributing one!
BodyAxis BODY_AXIS_LINEAR_Y = 2
There is currently no description for this enum. Please help us by contributing one!
BodyAxis BODY_AXIS_LINEAR_Z = 4
There is currently no description for this enum. Please help us by contributing one!
BodyAxis BODY_AXIS_ANGULAR_X = 8
There is currently no description for this enum. Please help us by contributing one!
BodyAxis BODY_AXIS_ANGULAR_Y = 16
There is currently no description for this enum. Please help us by contributing one!
BodyAxis BODY_AXIS_ANGULAR_Z = 32
There is currently no description for this enum. Please help us by contributing one!
Descripciones de Métodos
void area_add_shape(area: RID, shape: RID, transform: Transform3D = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0), disabled: bool = false) 🔗
Añade una forma a la zona, junto con una matriz de transformación. Las formas suelen estar referenciadas por su índice, por lo que se debe rastrear qué forma tiene un índice determinado.
void area_attach_object_instance_id(area: RID, id: int) 🔗
Asigna el área a un descendiente de Object, para que pueda existir en el árbol de nodos.
void area_clear_shapes(area: RID) 🔗
Elimina todas las formas de un área. No elimina las formas, por lo que pueden ser reasignadas más tarde.
Crea un objeto de área 3D en el servidor de física y devuelve el RID que lo identifica. La configuración predeterminada para el área creada incluye una capa y máscara de colisión establecidas en 1, y monitorable establecido en false.
Usa area_add_shape() para agregarle formas, usa area_set_transform() para establecer su transformación y usa area_set_space() para agregar el área a un espacio. Si quieres que el área sea detectable, usa area_set_monitorable().
int area_get_collision_layer(area: RID) const 🔗
Devuelve la capa o capas físicas a las que pertenece un área.
int area_get_collision_mask(area: RID) const 🔗
Devuelve la capa o capas físicas con las que un área puede entrar en contacto.
int area_get_object_instance_id(area: RID) const 🔗
Obtiene el ID de la instancia del objeto al que está asignada el área.
Variant area_get_param(area: RID, param: AreaParameter) const 🔗
Devuelve un valor de parámetro de área. Una lista de los parámetros disponibles se encuentra en las constantes AreaParameter.
RID area_get_shape(area: RID, shape_idx: int) const 🔗
Devuelve el RID de la forma enésima de un área.
int area_get_shape_count(area: RID) const 🔗
Devuelve el número de formas asignadas a un área.
Transform3D area_get_shape_transform(area: RID, shape_idx: int) const 🔗
Devuelve la matriz de transformación de una forma dentro de un área.
RID area_get_space(area: RID) const 🔗
Devuelve el espacio asignado a la zona.
Transform3D area_get_transform(area: RID) const 🔗
Devuelve la matriz de transformación de un área.
void area_remove_shape(area: RID, shape_idx: int) 🔗
Elimina una forma de un área. No borra la forma, por lo que puede ser reasignada más tarde.
void area_set_area_monitor_callback(area: RID, callback: Callable) 🔗
Sets the area's area monitor callback. This callback will be called when any other (shape of an) area enters or exits (a shape of) the given area, and must take the following five parameters:
an integer
status: either AREA_BODY_ADDED or AREA_BODY_REMOVED depending on whether the other area's shape entered or exited the area,an RID
area_rid: the RID of the other area that entered or exited the area,an integer
instance_id: theObjectIDattached to the other area,an integer
area_shape_idx: the index of the shape of the other area that entered or exited the area,an integer
self_shape_idx: the index of the shape of the area where the other area entered or exited.
By counting (or keeping track of) the shapes that enter and exit, it can be determined if an area (with all its shapes) is entering for the first time or exiting for the last time.
void area_set_collision_layer(area: RID, layer: int) 🔗
Asigna el área a una o varias capas de la física.
void area_set_collision_mask(area: RID, mask: int) 🔗
Establece qué capas de la física monitoreará el área.
void area_set_monitor_callback(area: RID, callback: Callable) 🔗
Sets the area's body monitor callback. This callback will be called when any other (shape of a) body enters or exits (a shape of) the given area, and must take the following five parameters:
an integer
status: either AREA_BODY_ADDED or AREA_BODY_REMOVED depending on whether the other body shape entered or exited the area,an RID
body_rid: the RID of the body that entered or exited the area,an integer
instance_id: theObjectIDattached to the body,an integer
body_shape_idx: the index of the shape of the body that entered or exited the area,an integer
self_shape_idx: the index of the shape of the area where the body entered or exited.
By counting (or keeping track of) the shapes that enter and exit, it can be determined if a body (with all its shapes) is entering for the first time or exiting for the last time.
void area_set_monitorable(area: RID, monitorable: bool) 🔗
There is currently no description for this method. Please help us by contributing one!
void area_set_param(area: RID, param: AreaParameter, value: Variant) 🔗
Establece el valor de un parámetro de área. Una lista de los parámetros disponibles se encuentra en las constantes AreaParameter.
void area_set_ray_pickable(area: RID, enable: bool) 🔗
Establece un objeto que se puede recoger con los rayos.
void area_set_shape(area: RID, shape_idx: int, shape: RID) 🔗
Sustituye una forma de área dada por otra. La forma antigua es seleccionada por su índice, la nueva por su RID.
void area_set_shape_disabled(area: RID, shape_idx: int, disabled: bool) 🔗
There is currently no description for this method. Please help us by contributing one!
void area_set_shape_transform(area: RID, shape_idx: int, transform: Transform3D) 🔗
Establece la matriz de transformación para la forma de un área.
void area_set_space(area: RID, space: RID) 🔗
Asigna un espacio a la zona.
void area_set_transform(area: RID, transform: Transform3D) 🔗
Establece la matriz de transformación para un área.
void body_add_collision_exception(body: RID, excepted_body: RID) 🔗
Añade un cuerpo a la lista de cuerpos exentos de colisiones.
void body_add_constant_central_force(body: RID, force: Vector3) 🔗
Añade una fuerza direccional constante sin afectar la rotación que se sigue aplicando con el tiempo hasta que se borra con body_set_constant_force(body, Vector3(0, 0, 0)).
Esto es equivalente a usar body_add_constant_force() en el centro de masa del cuerpo.
void body_add_constant_force(body: RID, force: Vector3, position: Vector3 = Vector3(0, 0, 0)) 🔗
Adds a constant positioned force to the body that keeps being applied over time until cleared with body_set_constant_force(body, Vector3(0, 0, 0)).
position is the offset from the body origin in global coordinates.
void body_add_constant_torque(body: RID, torque: Vector3) 🔗
Añade una fuerza rotacional constante sin afectar la posición que se aplica con el tiempo hasta que se borra con body_set_constant_torque(body, Vector3(0, 0, 0)).
void body_add_shape(body: RID, shape: RID, transform: Transform3D = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0), disabled: bool = false) 🔗
Añade una forma al cuerpo, junto con una matriz de transformación. Las formas suelen estar referenciadas por su índice, así que debes rastrear qué forma tiene un índice determinado.
void body_apply_central_force(body: RID, force: Vector3) 🔗
Aplica una fuerza direccional sin afectar la rotación. Una fuerza depende del tiempo y está destinada a aplicarse en cada actualización de la física.
Esto es equivalente a usar body_apply_force() en el centro de masa del cuerpo.
void body_apply_central_impulse(body: RID, impulse: Vector3) 🔗
Aplica un impulso direccional sin afectar la rotación.
¡Un impulso es independiente del tiempo! Aplicar un impulso en cada frame resultaría en una fuerza dependiente del framerate. Por esta razón, solo debe usarse al simular impactos únicos (usa las funciones "_force" en caso contrario).
Esto es equivalente a usar body_apply_impulse() en el centro de masa del cuerpo.
void body_apply_force(body: RID, force: Vector3, position: Vector3 = Vector3(0, 0, 0)) 🔗
Aplica una fuerza posicionada al cuerpo. Una fuerza depende del tiempo y está pensada para ser aplicada en cada actualización de la física.
position es el desplazamiento desde el origen del cuerpo en coordenadas globales.
void body_apply_impulse(body: RID, impulse: Vector3, position: Vector3 = Vector3(0, 0, 0)) 🔗
Aplica un impulso posicionado al cuerpo.
¡Un impulso es independiente del tiempo! Aplicar un impulso en cada fotograma resultaría en una fuerza dependiente de la velocidad de fotogramas. Por esta razón, solo debe usarse al simular impactos únicos (usa las funciones "_force" en su lugar).
position es el desplazamiento desde el origen del cuerpo en coordenadas globales.
void body_apply_torque(body: RID, torque: Vector3) 🔗
Aplica una fuerza rotacional sin afectar la posición. Una fuerza depende del tiempo y está destinada a aplicarse en cada actualización de la física.
void body_apply_torque_impulse(body: RID, impulse: Vector3) 🔗
Applies a rotational impulse to the body without affecting the position.
An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise).
void body_attach_object_instance_id(body: RID, id: int) 🔗
Asigna el área a un descendiente de Object, para que pueda existir en el árbol de nodos.
void body_clear_shapes(body: RID) 🔗
Elimina todas las formas de un cuerpo.
Crea un objeto cuerpo 3D en el servidor de física y devuelve el RID que lo identifica. La configuración predeterminada para el área creada incluye una capa de colisión y una máscara establecida en 1, y el modo de cuerpo establecido en BODY_MODE_RIGID.
Usa body_add_shape() para agregarle formas, usa body_set_state() para establecer su transformación, y usa body_set_space() para agregar el cuerpo a un espacio.
int body_get_collision_layer(body: RID) const 🔗
Devuelve la capa o capas físicas a las que pertenece un cuerpo.
int body_get_collision_mask(body: RID) const 🔗
Devuelve la capa física o las capas con las que un cuerpo puede colisionar.
float body_get_collision_priority(body: RID) const 🔗
Devuelve la prioridad de colisión del cuerpo.
Vector3 body_get_constant_force(body: RID) const 🔗
Devuelve el total de fuerzas posicionales constantes del cuerpo aplicadas durante cada actualización de físicas.
Véase body_add_constant_force() y body_add_constant_central_force().
Vector3 body_get_constant_torque(body: RID) const 🔗
Devuelve el total de fuerzas rotacionales constantes del cuerpo aplicadas durante cada actualización de físicas.
Véase body_add_constant_torque().
PhysicsDirectBodyState3D body_get_direct_state(body: RID) 🔗
Devuelve el PhysicsDirectBodyState3D del cuerpo. Devuelve null si el cuerpo es destruido o eliminado del espacio de físicas.
int body_get_max_contacts_reported(body: RID) const 🔗
Devuelve el máximo de contactos que se pueden reportar. Véase body_set_max_contacts_reported().
BodyMode body_get_mode(body: RID) const 🔗
Devuelve el modo de cuerpo.
int body_get_object_instance_id(body: RID) const 🔗
Obtiene el ID de la instancia del objeto al que está asignada el área.
Variant body_get_param(body: RID, param: BodyParameter) const 🔗
Devuelve el valor de un parámetro corporal. Una lista de parámetros disponibles se encuentra en las constantes BodyParameter.
RID body_get_shape(body: RID, shape_idx: int) const 🔗
Devuelve el RID de la enésima forma de un cuerpo.
int body_get_shape_count(body: RID) const 🔗
Devuelve el número de formas asignadas a un cuerpo.
Transform3D body_get_shape_transform(body: RID, shape_idx: int) const 🔗
Devuelve la matriz de transformación de una forma corporal.
RID body_get_space(body: RID) const 🔗
Devuelve el RID del espacio asignado a un cuerpo.
Variant body_get_state(body: RID, state: BodyState) const 🔗
Devuelve un estado corporal.
bool body_is_axis_locked(body: RID, axis: BodyAxis) const 🔗
There is currently no description for this method. Please help us by contributing one!
bool body_is_continuous_collision_detection_enabled(body: RID) const 🔗
Si es true, se activa el modo de detección de colisión continua.
bool body_is_omitting_force_integration(body: RID) const 🔗
Devuelve true si el cuerpo está omitiendo la integración de fuerza estándar. Véase body_set_omit_force_integration().
void body_remove_collision_exception(body: RID, excepted_body: RID) 🔗
Elimina un cuerpo de la lista de cuerpos exentos de colisiones.
La detección continua de colisiones intenta predecir dónde colisionará un cuerpo en movimiento, en lugar de moverlo y corregir su movimiento si colisionara.
void body_remove_shape(body: RID, shape_idx: int) 🔗
Quita una forma de un cuerpo. La forma no se borra, por lo que puede ser reutilizada después.
void body_reset_mass_properties(body: RID) 🔗
Restaura la inercia y el centro de masa por defecto basados en las formas para cancelar cualquier valor personalizado previamente establecido usando body_set_param().
void body_set_axis_lock(body: RID, axis: BodyAxis, lock: bool) 🔗
There is currently no description for this method. Please help us by contributing one!
void body_set_axis_velocity(body: RID, axis_velocity: Vector3) 🔗
Establece una velocidad del eje. La velocidad en el eje vectorial dado se fijará como la longitud del vector dado. Esto es útil para el comportamiento de salto.
void body_set_collision_layer(body: RID, layer: int) 🔗
Establece la capa o capas físicas a las que pertenece un cuerpo.
void body_set_collision_mask(body: RID, mask: int) 🔗
Establece la capa física o las capas con las que un cuerpo puede colisionar.
void body_set_collision_priority(body: RID, priority: float) 🔗
Establece la prioridad de colisión del cuerpo.
void body_set_constant_force(body: RID, force: Vector3) 🔗
Establece el total de fuerzas posicionales constantes del cuerpo aplicadas durante cada actualización de físicas.
Véase body_add_constant_force() y body_add_constant_central_force().
void body_set_constant_torque(body: RID, torque: Vector3) 🔗
Establece el total de fuerzas rotacionales constantes del cuerpo aplicadas durante cada actualización de físicas.
Véase body_add_constant_torque().
void body_set_enable_continuous_collision_detection(body: RID, enable: bool) 🔗
Si es true, se activa el modo de detección de colisión continua.
La detección de colisión continua trata de predecir dónde colisionará un cuerpo en movimiento, en lugar de moverlo y corregir su movimiento si colisionara.
void body_set_force_integration_callback(body: RID, callable: Callable, userdata: Variant = null) 🔗
Establece la función de callback de integración de fuerza personalizada del cuerpo a callable. Usa un Callable vacío (Callable()) para limpiar el callback personalizado.
La función callable será llamada en cada tick de físicas, antes de la integración de fuerza estándar (véase body_set_omit_force_integration()). Puede ser usada, por ejemplo, para actualizar la velocidad lineal y angular del cuerpo basada en el contacto con otros cuerpos.
Si userdata no es null, la función callable debe tomar los siguientes dos parámetros:
state: un PhysicsDirectBodyState3D, usado para recuperar y modificar el estado del cuerpo,userdata: un Variant; su valor será eluserdatapasado a este método.
Si userdata es null, entonces callable debe tomar solo el parámetro state.
void body_set_max_contacts_reported(body: RID, amount: int) 🔗
Establece el número máximo de contactos a reportar. Los cuerpos pueden mantener un registro de los contactos con otros cuerpos. Esto se habilita estableciendo el número máximo de contactos reportados a un número mayor que 0.
void body_set_mode(body: RID, mode: BodyMode) 🔗
Establece el modo de cuerpo.
void body_set_omit_force_integration(body: RID, enable: bool) 🔗
Establece si el cuerpo omite la integración de fuerza estándar. Si enable es true, el cuerpo no usará automáticamente las fuerzas aplicadas, torques y amortiguación para actualizar la velocidad lineal y angular del cuerpo. En este caso, body_set_force_integration_callback() puede ser usado para actualizar manualmente la velocidad lineal y angular en su lugar.
Este método es llamado cuando la propiedad RigidBody3D.custom_integrator es establecida.
void body_set_param(body: RID, param: BodyParameter, value: Variant) 🔗
Establece un parámetro corporal. Una lista de parámetros disponibles se encuentra en las constantes BodyParameter.
void body_set_ray_pickable(body: RID, enable: bool) 🔗
Establece que el cuerpo sea seleccionable con rayos si enable está establecido.
void body_set_shape(body: RID, shape_idx: int, shape: RID) 🔗
Sustituye una forma corporal dada por otra. La forma antigua es seleccionada por su índice, la nueva por su RID.
void body_set_shape_disabled(body: RID, shape_idx: int, disabled: bool) 🔗
There is currently no description for this method. Please help us by contributing one!
void body_set_shape_transform(body: RID, shape_idx: int, transform: Transform3D) 🔗
Establece la matriz de transformación para una forma corporal.
void body_set_space(body: RID, space: RID) 🔗
Asigna un espacio al cuerpo (véase space_create()).
void body_set_state(body: RID, state: BodyState, value: Variant) 🔗
Establece un estado corporal.
void body_set_state_sync_callback(body: RID, callable: Callable) 🔗
Establece la función de callback de sincronización de estado del cuerpo a callable. Usa un Callable vacío (Callable()) para limpiar el callback.
La función callable será llamada cada fotograma de física, asumiendo que el cuerpo estuvo activo durante el tick de física anterior, y puede ser usada para obtener el último estado del servidor de física.
La función callable debe tomar los siguientes parámetros:
state: un PhysicsDirectBodyState3D, usado para recuperar el estado del cuerpo.
bool body_test_motion(body: RID, parameters: PhysicsTestMotionParameters3D, result: PhysicsTestMotionResult3D = null) 🔗
Devuelve true si una colisión resultaría de moverse a lo largo de un vector de movimiento desde un punto dado en el espacio. Se pasa un PhysicsTestMotionParameters3D para establecer los parámetros de movimiento. Se puede pasar un PhysicsTestMotionResult3D para devolver información adicional.
There is currently no description for this method. Please help us by contributing one!
There is currently no description for this method. Please help us by contributing one!
RID concave_polygon_shape_create() 🔗
There is currently no description for this method. Please help us by contributing one!
float cone_twist_joint_get_param(joint: RID, param: ConeTwistJointParam) const 🔗
Obtiene un parámetro de la articulación de cono y torsión (cone twist).
void cone_twist_joint_set_param(joint: RID, param: ConeTwistJointParam, value: float) 🔗
Establece un parámetro de la articulación de cono y torsión (cone twist).
RID convex_polygon_shape_create() 🔗
There is currently no description for this method. Please help us by contributing one!
There is currently no description for this method. Please help us by contributing one!
There is currently no description for this method. Please help us by contributing one!
Destruye cualquiera de los objetos creados por PhysicsServer3D. Si el RID pasado no es uno de los objetos que puede ser creado por PhysicsServer3D, se enviará un error a la consola.
bool generic_6dof_joint_get_flag(joint: RID, axis: Axis, flag: G6DOFJointAxisFlag) const 🔗
Devuelve el valor de una bandera de una articulación genérica de 6 grados de libertad (6DOF).
float generic_6dof_joint_get_param(joint: RID, axis: Axis, param: G6DOFJointAxisParam) const 🔗
Devuelve el valor de un parámetro de una articulación genérica de 6 grados de libertad (6DOF).
void generic_6dof_joint_set_flag(joint: RID, axis: Axis, flag: G6DOFJointAxisFlag, enable: bool) 🔗
Establece el valor de una bandera dada de una articulación genérica de 6 grados de libertad (6DOF).
void generic_6dof_joint_set_param(joint: RID, axis: Axis, param: G6DOFJointAxisParam, value: float) 🔗
Establece el valor de un parámetro dado de una articulación genérica de 6 grados de libertad (6DOF).
int get_process_info(process_info: ProcessInfo) 🔗
Devuelve el valor de un estado del motor de física especificado por process_info.
RID heightmap_shape_create() 🔗
There is currently no description for this method. Please help us by contributing one!
bool hinge_joint_get_flag(joint: RID, flag: HingeJointFlag) const 🔗
Obtiene una bandera de una articulación de bisagra (hinge).
float hinge_joint_get_param(joint: RID, param: HingeJointParam) const 🔗
Obtiene un parámetro de una articulación de bisagra (hinge).
void hinge_joint_set_flag(joint: RID, flag: HingeJointFlag, enabled: bool) 🔗
Establece una bandera de una articulación de bisagra (hinge).
void hinge_joint_set_param(joint: RID, param: HingeJointParam, value: float) 🔗
Establece un parámetro de una articulación de bisagra (hinge).
void joint_clear(joint: RID) 🔗
There is currently no description for this method. Please help us by contributing one!
There is currently no description for this method. Please help us by contributing one!
void joint_disable_collisions_between_bodies(joint: RID, disable: bool) 🔗
Establece si los cuerpos unidos a la Joint3D colisionarán entre sí.
int joint_get_solver_priority(joint: RID) const 🔗
Obtiene el valor de prioridad del Joint3D.
JointType joint_get_type(joint: RID) const 🔗
Devuelve el tipo del Joint3D.
bool joint_is_disabled_collisions_between_bodies(joint: RID) const 🔗
Devuelve si los cuerpos unidos a la Joint3D colisionarán entre sí.
void joint_make_cone_twist(joint: RID, body_A: RID, local_ref_A: Transform3D, body_B: RID, local_ref_B: Transform3D) 🔗
There is currently no description for this method. Please help us by contributing one!
void joint_make_generic_6dof(joint: RID, body_A: RID, local_ref_A: Transform3D, body_B: RID, local_ref_B: Transform3D) 🔗
Convierte la unión en una unión genérica de seis grados de libertad (6DOF). Usa generic_6dof_joint_set_flag() y generic_6dof_joint_set_param() para establecer las banderas y parámetros de la unión respectivamente.
void joint_make_hinge(joint: RID, body_A: RID, hinge_A: Transform3D, body_B: RID, hinge_B: Transform3D) 🔗
There is currently no description for this method. Please help us by contributing one!
void joint_make_pin(joint: RID, body_A: RID, local_A: Vector3, body_B: RID, local_B: Vector3) 🔗
There is currently no description for this method. Please help us by contributing one!
void joint_make_slider(joint: RID, body_A: RID, local_ref_A: Transform3D, body_B: RID, local_ref_B: Transform3D) 🔗
There is currently no description for this method. Please help us by contributing one!
void joint_set_solver_priority(joint: RID, priority: int) 🔗
Establece el valor de prioridad del Joint3D.
Vector3 pin_joint_get_local_a(joint: RID) const 🔗
Devuelve la posición de la articulación en el espacio local del cuerpo a de la articulación.
Vector3 pin_joint_get_local_b(joint: RID) const 🔗
Devuelve la posición de la articulación en el espacio local del cuerpo b de la articulación.
float pin_joint_get_param(joint: RID, param: PinJointParam) const 🔗
Gets a pin joint parameter.
void pin_joint_set_local_a(joint: RID, local_A: Vector3) 🔗
Establece la posición de la articulación en el espacio local del cuerpo a de la articulación.
void pin_joint_set_local_b(joint: RID, local_B: Vector3) 🔗
Establece la posición de la articulación en el espacio local del cuerpo b de la articulación.
void pin_joint_set_param(joint: RID, param: PinJointParam, value: float) 🔗
Sets a pin joint parameter.
RID separation_ray_shape_create() 🔗
There is currently no description for this method. Please help us by contributing one!
void set_active(active: bool) 🔗
Activa o desactiva el motor de física 3D.
Variant shape_get_data(shape: RID) const 🔗
Devuelve los datos de la forma.
float shape_get_margin(shape: RID) const 🔗
Returns the collision margin for the shape.
Note: This is not used in Godot Physics, so will always return 0.
ShapeType shape_get_type(shape: RID) const 🔗
Devuelve el tipo de forma.
void shape_set_data(shape: RID, data: Variant) 🔗
Establece los datos de forma que definen su forma y tamaño. Los datos que se pasarán dependen del tipo de forma creada shape_get_type().
void shape_set_margin(shape: RID, margin: float) 🔗
Sets the collision margin for the shape.
Note: This is not used in Godot Physics.
float slider_joint_get_param(joint: RID, param: SliderJointParam) const 🔗
Gets a slider joint parameter.
void slider_joint_set_param(joint: RID, param: SliderJointParam, value: float) 🔗
Gets a slider joint parameter.
void soft_body_add_collision_exception(body: RID, body_b: RID) 🔗
Añade el cuerpo dado a la lista de cuerpos exentos de colisiones.
void soft_body_apply_central_force(body: RID, force: Vector3) 🔗
Distribuye y aplica una fuerza a todos los puntos. Una fuerza depende del tiempo y está pensada para aplicarse en cada actualización de la física.
void soft_body_apply_central_impulse(body: RID, impulse: Vector3) 🔗
Distribuye y aplica un impulso a todos los puntos.
¡Un impulso es independiente del tiempo! Aplicar un impulso cada frame resultaría en una fuerza dependiente del framerate. Por esta razón, solo debe usarse al simular impactos únicos (usa las funciones "_force" en caso contrario).
void soft_body_apply_point_force(body: RID, point_index: int, force: Vector3) 🔗
Aplica una fuerza a un punto. Una fuerza depende del tiempo y está pensada para aplicarse en cada actualización de la física.
void soft_body_apply_point_impulse(body: RID, point_index: int, impulse: Vector3) 🔗
Applies an impulse to a point.
An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise).
Creates a new soft body and returns its internal RID.
AABB soft_body_get_bounds(body: RID) const 🔗
Devuelve los límites del cuerpo blando dado en coordenadas globales.
int soft_body_get_collision_layer(body: RID) const 🔗
Returns the physics layer or layers that the given soft body belongs to.
int soft_body_get_collision_mask(body: RID) const 🔗
Returns the physics layer or layers that the given soft body can collide with.
float soft_body_get_damping_coefficient(body: RID) const 🔗
Returns the damping coefficient of the given soft body.
float soft_body_get_drag_coefficient(body: RID) const 🔗
Returns the drag coefficient of the given soft body.
float soft_body_get_linear_stiffness(body: RID) const 🔗
Returns the linear stiffness of the given soft body.
Vector3 soft_body_get_point_global_position(body: RID, point_index: int) const 🔗
Returns the current position of the given soft body point in global coordinates.
float soft_body_get_pressure_coefficient(body: RID) const 🔗
Returns the pressure coefficient of the given soft body.
float soft_body_get_shrinking_factor(body: RID) const 🔗
Returns the shrinking factor of the given soft body.
int soft_body_get_simulation_precision(body: RID) const 🔗
Returns the simulation precision of the given soft body.
RID soft_body_get_space(body: RID) const 🔗
Returns the RID of the space assigned to the given soft body.
Variant soft_body_get_state(body: RID, state: BodyState) const 🔗
Returns the given soft body state.
Note: Godot's default physics implementation does not support BODY_STATE_LINEAR_VELOCITY, BODY_STATE_ANGULAR_VELOCITY, BODY_STATE_SLEEPING, or BODY_STATE_CAN_SLEEP.
float soft_body_get_total_mass(body: RID) const 🔗
Returns the total mass assigned to the given soft body.
bool soft_body_is_point_pinned(body: RID, point_index: int) const 🔗
Returns whether the given soft body point is pinned.
void soft_body_move_point(body: RID, point_index: int, global_position: Vector3) 🔗
Moves the given soft body point to a position in global coordinates.
void soft_body_pin_point(body: RID, point_index: int, pin: bool) 🔗
Pins or unpins the given soft body point based on the value of pin.
Note: Pinning a point effectively makes it kinematic, preventing it from being affected by forces, but you can still move it using soft_body_move_point().
void soft_body_remove_all_pinned_points(body: RID) 🔗
Unpins all points of the given soft body.
void soft_body_remove_collision_exception(body: RID, body_b: RID) 🔗
Removes the given body from the list of bodies exempt from collisions.
void soft_body_set_collision_layer(body: RID, layer: int) 🔗
Sets the physics layer or layers the given soft body belongs to.
void soft_body_set_collision_mask(body: RID, mask: int) 🔗
Sets the physics layer or layers the given soft body can collide with.
void soft_body_set_damping_coefficient(body: RID, damping_coefficient: float) 🔗
Sets the damping coefficient of the given soft body. Higher values will slow down the body more noticeably when forces are applied.
void soft_body_set_drag_coefficient(body: RID, drag_coefficient: float) 🔗
Sets the drag coefficient of the given soft body. Higher values increase this body's air resistance.
Note: This value is currently unused by Godot's default physics implementation.
void soft_body_set_linear_stiffness(body: RID, stiffness: float) 🔗
Sets the linear stiffness of the given soft body. Higher values will result in a stiffer body, while lower values will increase the body's ability to bend. The value can be between 0.0 and 1.0 (inclusive).
void soft_body_set_mesh(body: RID, mesh: RID) 🔗
Sets the mesh of the given soft body.
void soft_body_set_pressure_coefficient(body: RID, pressure_coefficient: float) 🔗
Sets the pressure coefficient of the given soft body. Simulates pressure build-up from inside this body. Higher values increase the strength of this effect.
void soft_body_set_ray_pickable(body: RID, enable: bool) 🔗
Sets whether the given soft body will be pickable when using object picking.
void soft_body_set_shrinking_factor(body: RID, shrinking_factor: float) 🔗
Sets the shrinking factor of the given soft body.
void soft_body_set_simulation_precision(body: RID, simulation_precision: int) 🔗
Sets the simulation precision of the given soft body. Increasing this value will improve the resulting simulation, but can affect performance. Use with care.
void soft_body_set_space(body: RID, space: RID) 🔗
Assigns a space to the given soft body (see space_create()).
void soft_body_set_state(body: RID, state: BodyState, variant: Variant) 🔗
Sets the given body state for the given body.
Note: Godot's default physics implementation does not support BODY_STATE_LINEAR_VELOCITY, BODY_STATE_ANGULAR_VELOCITY, BODY_STATE_SLEEPING, or BODY_STATE_CAN_SLEEP.
void soft_body_set_total_mass(body: RID, total_mass: float) 🔗
Sets the total mass for the given soft body.
void soft_body_set_transform(body: RID, transform: Transform3D) 🔗
Sets the global transform of the given soft body.
void soft_body_update_rendering_server(body: RID, rendering_server_handler: PhysicsServer3DRenderingServerHandler) 🔗
Requests that the physics server updates the rendering server with the latest positions of the given soft body's points through the rendering_server_handler interface.
Crea un espacio. Un espacio es una colección de parámetros para el motor de la física que puede ser asignado a un área o a un cuerpo. Puede ser asignado a un área con area_set_space(), o a un cuerpo con body_set_space().
PhysicsDirectSpaceState3D space_get_direct_state(space: RID) 🔗
Returns the state of a space, a PhysicsDirectSpaceState3D. This object can be used to make collision/intersection queries.
float space_get_param(space: RID, param: SpaceParameter) const 🔗
Devuelve el valor de un parámetro espacial.
bool space_is_active(space: RID) const 🔗
Devuelve si el espacio está activo.
void space_set_active(space: RID, active: bool) 🔗
Marca un espacio como activo. No tendrá efecto, a menos que se asigne a un área o cuerpo.
void space_set_param(space: RID, param: SpaceParameter, value: float) 🔗
Establece el valor de un parámetro espacial. Una lista de los parámetros disponibles se encuentra en las constantes SpaceParameter.
There is currently no description for this method. Please help us by contributing one!
RID world_boundary_shape_create() 🔗
There is currently no description for this method. Please help us by contributing one!