mirror of
https://github.com/godotengine/godot-docs-l10n.git
synced 2025-12-31 09:49:22 +03:00
427 lines
17 KiB
ReStructuredText
427 lines
17 KiB
ReStructuredText
:github_url: hide
|
|
|
|
.. _class_HingeJoint3D:
|
|
|
|
HingeJoint3D
|
|
============
|
|
|
|
**Eredita:** :ref:`Joint3D<class_Joint3D>` **<** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
|
|
|
|
Un giunto fisico che limita la rotazione di un corpo fisico 3D attorno a un asse rispetto a un altro corpo fisico.
|
|
|
|
.. rst-class:: classref-introduction-group
|
|
|
|
Descrizione
|
|
----------------------
|
|
|
|
Un giunto fisico che limita la rotazione di un corpo fisico 3D attorno a un asse relativo a un altro corpo fisico. Ad esempio, Il Corpo A può essere uno :ref:`StaticBody3D<class_StaticBody3D>` che rappresenta una cerniera di porta attorno alla quale ruota un :ref:`RigidBody3D<class_RigidBody3D>`.
|
|
|
|
.. rst-class:: classref-reftable-group
|
|
|
|
Proprietà
|
|
------------------
|
|
|
|
.. table::
|
|
:widths: auto
|
|
|
|
+---------------------------+---------------------------------------------------------------------------------------+----------------+
|
|
| :ref:`float<class_float>` | :ref:`angular_limit/bias<class_HingeJoint3D_property_angular_limit/bias>` | ``0.3`` |
|
|
+---------------------------+---------------------------------------------------------------------------------------+----------------+
|
|
| :ref:`bool<class_bool>` | :ref:`angular_limit/enable<class_HingeJoint3D_property_angular_limit/enable>` | ``false`` |
|
|
+---------------------------+---------------------------------------------------------------------------------------+----------------+
|
|
| :ref:`float<class_float>` | :ref:`angular_limit/lower<class_HingeJoint3D_property_angular_limit/lower>` | ``-1.5707964`` |
|
|
+---------------------------+---------------------------------------------------------------------------------------+----------------+
|
|
| :ref:`float<class_float>` | :ref:`angular_limit/relaxation<class_HingeJoint3D_property_angular_limit/relaxation>` | ``1.0`` |
|
|
+---------------------------+---------------------------------------------------------------------------------------+----------------+
|
|
| :ref:`float<class_float>` | :ref:`angular_limit/softness<class_HingeJoint3D_property_angular_limit/softness>` | ``0.9`` |
|
|
+---------------------------+---------------------------------------------------------------------------------------+----------------+
|
|
| :ref:`float<class_float>` | :ref:`angular_limit/upper<class_HingeJoint3D_property_angular_limit/upper>` | ``1.5707964`` |
|
|
+---------------------------+---------------------------------------------------------------------------------------+----------------+
|
|
| :ref:`bool<class_bool>` | :ref:`motor/enable<class_HingeJoint3D_property_motor/enable>` | ``false`` |
|
|
+---------------------------+---------------------------------------------------------------------------------------+----------------+
|
|
| :ref:`float<class_float>` | :ref:`motor/max_impulse<class_HingeJoint3D_property_motor/max_impulse>` | ``1.0`` |
|
|
+---------------------------+---------------------------------------------------------------------------------------+----------------+
|
|
| :ref:`float<class_float>` | :ref:`motor/target_velocity<class_HingeJoint3D_property_motor/target_velocity>` | ``1.0`` |
|
|
+---------------------------+---------------------------------------------------------------------------------------+----------------+
|
|
| :ref:`float<class_float>` | :ref:`params/bias<class_HingeJoint3D_property_params/bias>` | ``0.3`` |
|
|
+---------------------------+---------------------------------------------------------------------------------------+----------------+
|
|
|
|
.. rst-class:: classref-reftable-group
|
|
|
|
Metodi
|
|
------------
|
|
|
|
.. table::
|
|
:widths: auto
|
|
|
|
+---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`get_flag<class_HingeJoint3D_method_get_flag>`\ (\ flag\: :ref:`Flag<enum_HingeJoint3D_Flag>`\ ) |const| |
|
|
+---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`float<class_float>` | :ref:`get_param<class_HingeJoint3D_method_get_param>`\ (\ param\: :ref:`Param<enum_HingeJoint3D_Param>`\ ) |const| |
|
|
+---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`set_flag<class_HingeJoint3D_method_set_flag>`\ (\ flag\: :ref:`Flag<enum_HingeJoint3D_Flag>`, enabled\: :ref:`bool<class_bool>`\ ) |
|
|
+---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`set_param<class_HingeJoint3D_method_set_param>`\ (\ param\: :ref:`Param<enum_HingeJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) |
|
|
+---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
.. rst-class:: classref-section-separator
|
|
|
|
----
|
|
|
|
.. rst-class:: classref-descriptions-group
|
|
|
|
Enumerazioni
|
|
------------------------
|
|
|
|
.. _enum_HingeJoint3D_Param:
|
|
|
|
.. rst-class:: classref-enumeration
|
|
|
|
enum **Param**: :ref:`🔗<enum_HingeJoint3D_Param>`
|
|
|
|
.. _class_HingeJoint3D_constant_PARAM_BIAS:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`Param<enum_HingeJoint3D_Param>` **PARAM_BIAS** = ``0``
|
|
|
|
La velocità con cui due corpi vengono attratti l'uno verso l'altro quando si muovono in direzioni diverse.
|
|
|
|
.. _class_HingeJoint3D_constant_PARAM_LIMIT_UPPER:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`Param<enum_HingeJoint3D_Param>` **PARAM_LIMIT_UPPER** = ``1``
|
|
|
|
La rotazione massima. È attiva solo se :ref:`angular_limit/enable<class_HingeJoint3D_property_angular_limit/enable>` è ``true``.
|
|
|
|
.. _class_HingeJoint3D_constant_PARAM_LIMIT_LOWER:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`Param<enum_HingeJoint3D_Param>` **PARAM_LIMIT_LOWER** = ``2``
|
|
|
|
La rotazione minima. È attiva solo se :ref:`angular_limit/enable<class_HingeJoint3D_property_angular_limit/enable>` è ``true``.
|
|
|
|
.. _class_HingeJoint3D_constant_PARAM_LIMIT_BIAS:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`Param<enum_HingeJoint3D_Param>` **PARAM_LIMIT_BIAS** = ``3``
|
|
|
|
La velocità con cui viene corretta la rotazione attorno all'asse perpendicolare alla cerniera.
|
|
|
|
.. _class_HingeJoint3D_constant_PARAM_LIMIT_SOFTNESS:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`Param<enum_HingeJoint3D_Param>` **PARAM_LIMIT_SOFTNESS** = ``4``
|
|
|
|
**Deprecato:** This property is never used by the engine and is kept for compatibility purpose.
|
|
|
|
|
|
|
|
.. _class_HingeJoint3D_constant_PARAM_LIMIT_RELAXATION:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`Param<enum_HingeJoint3D_Param>` **PARAM_LIMIT_RELAXATION** = ``5``
|
|
|
|
Più basso è questo valore, più la rotazione viene rallentata.
|
|
|
|
.. _class_HingeJoint3D_constant_PARAM_MOTOR_TARGET_VELOCITY:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`Param<enum_HingeJoint3D_Param>` **PARAM_MOTOR_TARGET_VELOCITY** = ``6``
|
|
|
|
Velocità di destinazione per il motore.
|
|
|
|
.. _class_HingeJoint3D_constant_PARAM_MOTOR_MAX_IMPULSE:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`Param<enum_HingeJoint3D_Param>` **PARAM_MOTOR_MAX_IMPULSE** = ``7``
|
|
|
|
Accelerazione massima per il motore.
|
|
|
|
.. _class_HingeJoint3D_constant_PARAM_MAX:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`Param<enum_HingeJoint3D_Param>` **PARAM_MAX** = ``8``
|
|
|
|
Rappresenta la dimensione dell'enumerazione :ref:`Param<enum_HingeJoint3D_Param>`.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _enum_HingeJoint3D_Flag:
|
|
|
|
.. rst-class:: classref-enumeration
|
|
|
|
enum **Flag**: :ref:`🔗<enum_HingeJoint3D_Flag>`
|
|
|
|
.. _class_HingeJoint3D_constant_FLAG_USE_LIMIT:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`Flag<enum_HingeJoint3D_Flag>` **FLAG_USE_LIMIT** = ``0``
|
|
|
|
Se ``true``, la rotazione massima e minima delle cerniere, definite da :ref:`angular_limit/lower<class_HingeJoint3D_property_angular_limit/lower>` e :ref:`angular_limit/upper<class_HingeJoint3D_property_angular_limit/upper>`, ha effetto.
|
|
|
|
.. _class_HingeJoint3D_constant_FLAG_ENABLE_MOTOR:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`Flag<enum_HingeJoint3D_Flag>` **FLAG_ENABLE_MOTOR** = ``1``
|
|
|
|
Quando è attivato, un motore fa girare la cerniera.
|
|
|
|
.. _class_HingeJoint3D_constant_FLAG_MAX:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`Flag<enum_HingeJoint3D_Flag>` **FLAG_MAX** = ``2``
|
|
|
|
Rappresenta la dimensione dell'enumerazione :ref:`Flag<enum_HingeJoint3D_Flag>`.
|
|
|
|
.. rst-class:: classref-section-separator
|
|
|
|
----
|
|
|
|
.. rst-class:: classref-descriptions-group
|
|
|
|
Descrizioni delle proprietà
|
|
------------------------------------------------------
|
|
|
|
.. _class_HingeJoint3D_property_angular_limit/bias:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`float<class_float>` **angular_limit/bias** = ``0.3`` :ref:`🔗<class_HingeJoint3D_property_angular_limit/bias>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_param**\ (\ param\: :ref:`Param<enum_HingeJoint3D_Param>`, value\: :ref:`float<class_float>`\ )
|
|
- :ref:`float<class_float>` **get_param**\ (\ param\: :ref:`Param<enum_HingeJoint3D_Param>`\ ) |const|
|
|
|
|
La velocità con cui viene corretta la rotazione attorno all'asse perpendicolare alla cerniera.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_HingeJoint3D_property_angular_limit/enable:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`bool<class_bool>` **angular_limit/enable** = ``false`` :ref:`🔗<class_HingeJoint3D_property_angular_limit/enable>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_flag**\ (\ flag\: :ref:`Flag<enum_HingeJoint3D_Flag>`, enabled\: :ref:`bool<class_bool>`\ )
|
|
- :ref:`bool<class_bool>` **get_flag**\ (\ flag\: :ref:`Flag<enum_HingeJoint3D_Flag>`\ ) |const|
|
|
|
|
Se ``true``, la rotazione massima e minima delle cerniere, definite da :ref:`angular_limit/lower<class_HingeJoint3D_property_angular_limit/lower>` e :ref:`angular_limit/upper<class_HingeJoint3D_property_angular_limit/upper>`, ha effetto.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_HingeJoint3D_property_angular_limit/lower:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`float<class_float>` **angular_limit/lower** = ``-1.5707964`` :ref:`🔗<class_HingeJoint3D_property_angular_limit/lower>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_param**\ (\ param\: :ref:`Param<enum_HingeJoint3D_Param>`, value\: :ref:`float<class_float>`\ )
|
|
- :ref:`float<class_float>` **get_param**\ (\ param\: :ref:`Param<enum_HingeJoint3D_Param>`\ ) |const|
|
|
|
|
La rotazione minima. È attiva solo se :ref:`angular_limit/enable<class_HingeJoint3D_property_angular_limit/enable>` è ``true``.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_HingeJoint3D_property_angular_limit/relaxation:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`float<class_float>` **angular_limit/relaxation** = ``1.0`` :ref:`🔗<class_HingeJoint3D_property_angular_limit/relaxation>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_param**\ (\ param\: :ref:`Param<enum_HingeJoint3D_Param>`, value\: :ref:`float<class_float>`\ )
|
|
- :ref:`float<class_float>` **get_param**\ (\ param\: :ref:`Param<enum_HingeJoint3D_Param>`\ ) |const|
|
|
|
|
Più basso è questo valore, più la rotazione viene rallentata.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_HingeJoint3D_property_angular_limit/softness:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`float<class_float>` **angular_limit/softness** = ``0.9`` :ref:`🔗<class_HingeJoint3D_property_angular_limit/softness>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_param**\ (\ param\: :ref:`Param<enum_HingeJoint3D_Param>`, value\: :ref:`float<class_float>`\ )
|
|
- :ref:`float<class_float>` **get_param**\ (\ param\: :ref:`Param<enum_HingeJoint3D_Param>`\ ) |const|
|
|
|
|
**Deprecato:** This property is never set by the engine and is kept for compatibility purposes.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_HingeJoint3D_property_angular_limit/upper:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`float<class_float>` **angular_limit/upper** = ``1.5707964`` :ref:`🔗<class_HingeJoint3D_property_angular_limit/upper>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_param**\ (\ param\: :ref:`Param<enum_HingeJoint3D_Param>`, value\: :ref:`float<class_float>`\ )
|
|
- :ref:`float<class_float>` **get_param**\ (\ param\: :ref:`Param<enum_HingeJoint3D_Param>`\ ) |const|
|
|
|
|
La rotazione massima. È attiva solo se :ref:`angular_limit/enable<class_HingeJoint3D_property_angular_limit/enable>` è ``true``.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_HingeJoint3D_property_motor/enable:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`bool<class_bool>` **motor/enable** = ``false`` :ref:`🔗<class_HingeJoint3D_property_motor/enable>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_flag**\ (\ flag\: :ref:`Flag<enum_HingeJoint3D_Flag>`, enabled\: :ref:`bool<class_bool>`\ )
|
|
- :ref:`bool<class_bool>` **get_flag**\ (\ flag\: :ref:`Flag<enum_HingeJoint3D_Flag>`\ ) |const|
|
|
|
|
Quando è attivato, un motore fa girare la cerniera.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_HingeJoint3D_property_motor/max_impulse:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`float<class_float>` **motor/max_impulse** = ``1.0`` :ref:`🔗<class_HingeJoint3D_property_motor/max_impulse>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_param**\ (\ param\: :ref:`Param<enum_HingeJoint3D_Param>`, value\: :ref:`float<class_float>`\ )
|
|
- :ref:`float<class_float>` **get_param**\ (\ param\: :ref:`Param<enum_HingeJoint3D_Param>`\ ) |const|
|
|
|
|
Accelerazione massima per il motore.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_HingeJoint3D_property_motor/target_velocity:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`float<class_float>` **motor/target_velocity** = ``1.0`` :ref:`🔗<class_HingeJoint3D_property_motor/target_velocity>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_param**\ (\ param\: :ref:`Param<enum_HingeJoint3D_Param>`, value\: :ref:`float<class_float>`\ )
|
|
- :ref:`float<class_float>` **get_param**\ (\ param\: :ref:`Param<enum_HingeJoint3D_Param>`\ ) |const|
|
|
|
|
Velocità di destinazione per il motore.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_HingeJoint3D_property_params/bias:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`float<class_float>` **params/bias** = ``0.3`` :ref:`🔗<class_HingeJoint3D_property_params/bias>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_param**\ (\ param\: :ref:`Param<enum_HingeJoint3D_Param>`, value\: :ref:`float<class_float>`\ )
|
|
- :ref:`float<class_float>` **get_param**\ (\ param\: :ref:`Param<enum_HingeJoint3D_Param>`\ ) |const|
|
|
|
|
La velocità con cui due corpi vengono attratti l'uno verso l'altro quando si muovono in direzioni diverse.
|
|
|
|
.. rst-class:: classref-section-separator
|
|
|
|
----
|
|
|
|
.. rst-class:: classref-descriptions-group
|
|
|
|
Descrizioni dei metodi
|
|
--------------------------------------------
|
|
|
|
.. _class_HingeJoint3D_method_get_flag:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`bool<class_bool>` **get_flag**\ (\ flag\: :ref:`Flag<enum_HingeJoint3D_Flag>`\ ) |const| :ref:`🔗<class_HingeJoint3D_method_get_flag>`
|
|
|
|
Restituisce il valore del flag specificato.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_HingeJoint3D_method_get_param:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`float<class_float>` **get_param**\ (\ param\: :ref:`Param<enum_HingeJoint3D_Param>`\ ) |const| :ref:`🔗<class_HingeJoint3D_method_get_param>`
|
|
|
|
Restituisce il valore del parametro specificato.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_HingeJoint3D_method_set_flag:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **set_flag**\ (\ flag\: :ref:`Flag<enum_HingeJoint3D_Flag>`, enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_HingeJoint3D_method_set_flag>`
|
|
|
|
Se ``true``, abilita il flag specificato.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_HingeJoint3D_method_set_param:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **set_param**\ (\ param\: :ref:`Param<enum_HingeJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) :ref:`🔗<class_HingeJoint3D_method_set_param>`
|
|
|
|
Imposta il valore del parametro specificato.
|
|
|
|
.. |virtual| replace:: :abbr:`virtual (Questo metodo dovrebbe solitamente essere sovrascritto dall'utente per aver un effetto.)`
|
|
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
|
.. |const| replace:: :abbr:`const (Questo metodo non ha effetti collaterali. Non modifica alcuna variabile appartenente all'istanza.)`
|
|
.. |vararg| replace:: :abbr:`vararg (Questo metodo accetta qualsiasi numero di argomenti oltre a quelli descritti qui.)`
|
|
.. |constructor| replace:: :abbr:`constructor (Questo metodo è utilizzato per creare un tipo.)`
|
|
.. |static| replace:: :abbr:`static (Questo metodo non necessita di alcun'istanza per essere chiamato, quindi può essere chiamato direttamente usando il nome della classe.)`
|
|
.. |operator| replace:: :abbr:`operator (Questo metodo descrive un operatore valido da usare con questo tipo come operando di sinistra.)`
|
|
.. |bitfield| replace:: :abbr:`BitField (Questo valore è un intero composto da una maschera di bit dei seguenti flag.)`
|
|
.. |void| replace:: :abbr:`void (Nessun valore restituito.)`
|