ドキュメント

Unity Engine

Unity Engine

useConnectedAnchor

Controls whether the connected anchor is used or not.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

Definition

  • Type: Property
  • Namespace: UnityEngine
  • Assembly: UnityEngine.Physics2DModule
public bool useConnectedAnchor { get; set; }

Remarks

By default, this property is enabled which results in the Joint2D.connectedBody and AnchoredJoint2D.connectedAnchor properties being used to constrain the position of the Rigidbody2D the HingeJoint2D is attached to. This is known as a point-to-point constraint.
When this property is disabled, the point-to-point constraint is disabled. This stops the HingeJoint2D from being connected to its anchor point allowing the Rigidbody2D it is added to, to move freely.
Disabling this allows both the motor and limits to be used to constrain and modify angular motion while not constraining linear motion.