言語: 日本語
  • C#
  • JS
  • Boo

スクリプト言語

お好みのスクリプト言語を選択すると、サンプルコードがその言語で表示されます。

JointDrive.maximumForce

public var maximumForce: float;

Description

設定された方向に押されているオブジェクトの力の量を返す。

	// Create a JointDrive, configure it and assign the JointDrive to
	// the zDrive element of a configurable joint.
	
	function Start() {
		var joint : ConfigurableJoint = gameObject.AddComponent(ConfigurableJoint);
		joint.targetPosition = Vector3(0,0,-10);
		
		var drive : JointDrive = JointDrive();
		drive.mode = JointDriveMode.Velocity;
		drive.maximumForce = Mathf.Infinity;;
		
		joint.zDrive = drive;
	}