示例#1
0
        public void UpdateDataFromLibrary()
        {
            if (nativeJoint == IntPtr.Zero)
            {
                return;
            }

            Vec3 position;
            Quat rotation;

            PhysXJoint.GetGlobalPose(nativeJoint, out position, out rotation);
            Vec3 axis = Vec3.XAxis * rotation;

            UpdateDataFromLibrary(ref axis);
        }
        public void UpdateDataFromLibrary()
        {
            if (nativeJoint == IntPtr.Zero)
            {
                return;
            }

            Vec3 globalAnchor;
            Quat globalRotation;

            PhysXJoint.GetGlobalPose(nativeJoint, out globalAnchor, out globalRotation);
            Vec3 axis1Direction = Body1.Rotation * axis1LocalAxis;
            Vec3 axis2Direction = Body1.Rotation * axis2LocalAxis;

            UpdateDataFromLibrary(ref globalAnchor, ref axis1Direction, ref axis2Direction);
        }