示例#1
0
		/// <summary>
		/// This requires a world target point,
		/// tuning parameters, and the time step.
		/// </summary>
		/// <param name="body">The body.</param>
		/// <param name="worldAnchor">The target.</param>
		public FixedMouseJoint( Body body, Vector2 worldAnchor ) : base( body )
		{
			jointType = JointType.FixedMouse;
			frequency = 5.0f;
			dampingRatio = 0.7f;
			maxForce = 1000 * body.mass;

			Debug.Assert( worldAnchor.isValid() );

			_worldAnchor = worldAnchor;
			localAnchorA = MathUtils.mulT( bodyA._xf, worldAnchor );
		}