Exemplo n.º 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 FSFixedMouseJoint(FSBody body, FVector2 worldAnchor)
            : base(body)
        {
            JointType    = JointType.FixedMouse;
            Frequency    = 5.0f;
            DampingRatio = 0.7f;
            MaxForce     = 1000 * body.Mass;

            Debug.Assert(worldAnchor.IsValid());

            _targetA     = worldAnchor;
            LocalAnchorB = MathUtils.MulT(BodyA.Xf, worldAnchor);
        }
Exemplo n.º 2
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, FVector2 worldAnchor)
            : base(body)
        {
            JointType = JointType.FixedMouse;
            Frequency = 5.0f;
            DampingRatio = 0.7f;
            MaxForce = 1000 * body.Mass;

            Debug.Assert(worldAnchor.IsValid());

            _targetA = worldAnchor;
            LocalAnchorB = MathUtils.MulT(BodyA.Xf, worldAnchor);
        }