Attention: Here be dragons

This is the latest (unstable) version of this documentation, which may document features not available in or compatible with released stable versions of Godot.

PinJoint2D

Hérite de : Joint2D < Node2D < CanvasItem < Node < Object

Une liaison physique qui attache deux corps physiques 2D en un seul point, leur permettant de tourner librement.

Description

Un liaison physique qui attache deux corps physiques 2D en un seul point, leur permettant de tourner librement. Par un exemple, un RigidBody2D peut être attaché à un StaticBody2D pour créer un pendule ou une balançoire.

Propriétés

bool

angular_limit_enabled

false

float

angular_limit_lower

0.0

float

angular_limit_upper

0.0

bool

motor_enabled

false

float

motor_target_velocity

0.0

float

softness

0.0


Descriptions des propriétés

bool angular_limit_enabled = false 🔗

  • void set_angular_limit_enabled(value: bool)

  • bool is_angular_limit_enabled()

If true, the pin maximum and minimum rotation, defined by angular_limit_lower and angular_limit_upper are applied.


float angular_limit_lower = 0.0 🔗

  • void set_angular_limit_lower(value: float)

  • float get_angular_limit_lower()

La rotation minimale. Uniquement active quand angular_limit_enabled vaut true.


float angular_limit_upper = 0.0 🔗

  • void set_angular_limit_upper(value: float)

  • float get_angular_limit_upper()

La rotation minimale. Uniquement active quand angular_limit_enabled vaut true.


bool motor_enabled = false 🔗

  • void set_motor_enabled(value: bool)

  • bool is_motor_enabled()

When activated, a motor turns the pin.


float motor_target_velocity = 0.0 🔗

  • void set_motor_target_velocity(value: float)

  • float get_motor_target_velocity()

Vitesse cible pour le moteur. En radians par seconde.


float softness = 0.0 🔗

  • void set_softness(value: float)

  • float get_softness()

The higher this value, the more the bond to the pinned partner can flex.