HingeJoint

Inherits: Joint < Spatial < Node < Object

A hinge between two 3D PhysicsBodies.

Descripción

A HingeJoint normally uses the Z axis of body A as the hinge axis, another axis can be specified when adding it manually though. See also Generic6DOFJoint.

Propiedades

float

angular_limit/bias

0.3

bool

angular_limit/enable

false

float

angular_limit/lower

-90.0

float

angular_limit/relaxation

1.0

float

angular_limit/softness

0.9

float

angular_limit/upper

90.0

bool

motor/enable

false

float

motor/max_impulse

1.0

float

motor/target_velocity

1.0

float

params/bias

0.3

Métodos

bool

get_flag ( Flag flag ) const

float

get_param ( Param param ) const

void

set_flag ( Flag flag, bool enabled )

void

set_param ( Param param, float value )

Enumeraciones

enum Param:

  • PARAM_BIAS = 0 --- La velocidad con la que los dos cuerpos se juntan cuando se mueven en diferentes direcciones.

  • PARAM_LIMIT_UPPER = 1 --- La rotación máxima. Sólo está activa si angular_limit/enable es true.

  • PARAM_LIMIT_LOWER = 2 --- La rotación mínima. Sólo está activa si angular_limit/enable es true.

  • PARAM_LIMIT_BIAS = 3 --- La velocidad con la que se corrige la rotación a través del eje perpendicular a la bisagra.

  • PARAM_LIMIT_SOFTNESS = 4

  • PARAM_LIMIT_RELAXATION = 5 --- Cuanto más bajo es este valor, más se ralentiza la rotación.

  • PARAM_MOTOR_TARGET_VELOCITY = 6 --- Velocidad objetivo para el motor.

  • PARAM_MOTOR_MAX_IMPULSE = 7 --- Aceleración máxima para el motor.

  • PARAM_MAX = 8 --- Representa el tamaño del enum Param.


enum Flag:

  • FLAG_USE_LIMIT = 0 --- Si true, la rotación máxima y mínima de las bisagras, definida por angular_limit/lower y angular_limit/upper tiene efectos.

  • FLAG_ENABLE_MOTOR = 1 --- Cuando se activa, un motor gira la bisagra.

  • FLAG_MAX = 2 --- Representa el tamaño del enum Flag.

Descripciones de Propiedades

  • float angular_limit/bias

Default

0.3

Setter

set_param(value)

Getter

get_param()

La velocidad con la que se corrige la rotación a través del eje perpendicular a la bisagra.


  • bool angular_limit/enable

Default

false

Setter

set_flag(value)

Getter

get_flag()

Si true, la rotación máxima y mínima de las bisagras, definida por angular_limit/lower y angular_limit/upper tiene efectos.


  • float angular_limit/lower

Default

-90.0

La rotación mínima. Sólo está activa si angular_limit/enable es true.


  • float angular_limit/relaxation

Default

1.0

Setter

set_param(value)

Getter

get_param()

Cuanto más bajo es este valor, más se ralentiza la rotación.


  • float angular_limit/softness

Default

0.9

Setter

set_param(value)

Getter

get_param()


  • float angular_limit/upper

Default

90.0

La rotación máxima. Sólo está activa si angular_limit/enable es true.


Default

false

Setter

set_flag(value)

Getter

get_flag()

Cuando se activa, un motor gira la bisagra.


  • float motor/max_impulse

Default

1.0

Setter

set_param(value)

Getter

get_param()

Aceleración máxima para el motor.


  • float motor/target_velocity

Default

1.0

Setter

set_param(value)

Getter

get_param()

Velocidad objetivo para el motor.


Default

0.3

Setter

set_param(value)

Getter

get_param()

La velocidad con la que los dos cuerpos se juntan cuando se mueven en diferentes direcciones.

Descripciones de Métodos

Devuelve el valor de la flag especificada.


Devuelve el valor del parámetro especificado.


  • void set_flag ( Flag flag, bool enabled )

Si true, activa la flag especificada.


Establece el valor del parámetro especificado.