Version: 5.3 (switch to 5.4b)
ЯзыкEnglish
  • C#
  • JS

Язык программирования

Выберите подходящий для вас язык программирования. Все примеры кода будут представлены на выбранном языке.

SliderJoint2D

class in UnityEngine

/

Наследует от:AnchoredJoint2D

Предложить изменения

Успех!

Благодарим вас за то, что вы помогаете нам улучшить качество документации по Unity. Однако, мы не можем принять любой перевод. Мы проверяем каждый предложенный вами вариант перевода и принимаем его только если он соответствует оригиналу.

Закрыть

Ошибка внесения изменений

По определённым причинам предложенный вами перевод не может быть принят. Пожалуйста <a>попробуйте снова</a> через пару минут. И выражаем вам свою благодарность за то, что вы уделяете время, чтобы улучшить документацию по Unity.

Закрыть

Отменить

Руководство

Описание

Joint that restricts the motion of a Rigidbody2D object to a single line.

Переменные

angleThe angle of the line in space (in degrees).
autoConfigureAngleShould the angle be calculated automatically?
jointSpeedThe current joint speed.
jointTranslationThe current joint translation.
limitsRestrictions on how far the joint can slide in each direction along the line.
limitStateGets the state of the joint limit.
motorParameters for a motor force that is applied automatically to the Rigibody2D along the line.
referenceAngleThe angle (in degrees) referenced between the two bodies used as the constraint for the joint.
useLimitsShould motion limits be used?
useMotorShould a motor force be applied automatically to the Rigidbody2D?

Открытые функции

GetMotorForceGets the motor force of the joint given the specified timestep.

Унаследованные члены

Переменные

anchorСовместная точка привязки на объекте, который имеет компонент - сустав.
autoConfigureConnectedAnchorДолжен ли connectedAnchor рассчитываться автоматически?
connectedAnchorСовместная точка привязки на втором объекте ( т.е. том, который не имеет компонента - сустава).
enabledEnabled Behaviours are Updated, disabled Behaviours are not.
isActiveAndEnabledHas the Behaviour had enabled called.
gameObjectThe game object this component is attached to. A component is always attached to a game object.
tagТег данного игрового объекта.
transformThe Transform attached to this GameObject (null if there is none attached).
breakForceСила, которую надо применить к соединению, чтобы сломать его.
breakTorqueКрутящий момент, который надо применить к соединению, чтобы сломать его.
connectedBodyОбъект Rigidbody2D, к которому подсоединен другой конец сустава (т.е. объект без компонента joint).
enableCollisionShould the two rigid bodies connected with this joint collide with each other?
reactionForceGets the reaction force of the joint.
reactionTorqueGets the reaction torque of the joint.
hideFlagsShould the object be hidden, saved with the scene or modifiable by the user?
nameThe name of the object.

Открытые функции

BroadcastMessageВызывает метод названный methodName на каждом MonoBehaviour этого game object-а или любого из его потомков.
CompareTagПомечен ли этот игровой объект тэгом tag?
GetComponentВозвращает компонент типа type, если он прикреплен к игровому объекту и null, если не прикреплен.
GetComponentInChildrenReturns the component of Type type in the GameObject or any of its children using depth first search.
GetComponentInParentReturns the component of Type type in the GameObject or any of its parents.
GetComponentsReturns all components of Type type in the GameObject.
GetComponentsInChildrenReturns all components of Type type in the GameObject or any of its children.
GetComponentsInParentReturns all components of Type type in the GameObject or any of its parents.
SendMessageВызывает метод с именем methodName в каждом MonoBehaviour на этом объекте.
SendMessageUpwardsВызывает на каждом MonoBehaviour в данном игровом объекте и на каждом предке скрипта метод с именем methodName.
GetReactionForceGets the reaction force of the joint given the specified timeStep.
GetReactionTorqueGets the reaction torque of the joint given the specified timeStep.
GetInstanceIDReturns the instance id of the object.
ToStringReturns the name of the game object.

Статические функции

DestroyRemoves a gameobject, component or asset.
DestroyImmediateDestroys the object obj immediately. You are strongly recommended to use Destroy instead.
DontDestroyOnLoadMakes the object target not be destroyed automatically when loading a new scene.
FindObjectOfTypeReturns the first active loaded object of Type type.
FindObjectsOfTypeReturns a list of all active loaded objects of Type type.
InstantiateReturns a copy of the object original.

Операторы

boolDoes the object exist?
operator !=Compares if two objects refer to a different object.
operator ==Compares two object references to see if they refer to the same object.

Сообщения

OnJointBreak2DCalled when a Joint2D attached to the same game object breaks.