void Update()
    {
        //closestPointOnBounds =	col.ClosestPointOnBounds (position:point);

        closestPointOnBounds = rig.ClosestPointOnBounds(position: point);

        closestPointOnBounds = GizmosForVector.Round(closestPointOnBounds, 2);
    }
    void Update()
    {
        //closestPointOnCollider =	Physics.ClosestPoint (point: new Vector3 (1,1), collider: col, position: tr.position, rotation: tr.rotation);

        closestPointOnCollider = col.ClosestPoint(position: new Vector3(0, 0));

        closestPointOnCollider = GizmosForVector.Round(closestPointOnCollider, 2);
    }
Esempio n. 3
0
    void OnDrawGizmos()
    {
        Quaternion aroundX = Quaternion.AngleAxis(aroundXAxis, transform.right);
        Quaternion aroundY = Quaternion.AngleAxis(aroundYAxis, transform.up);
        Quaternion aroundZ = Quaternion.AngleAxis(aroundZAxis, transform.forward);

        GizmosForVector.DrawCoordinateSystem(transform.position, aroundZ * aroundX * aroundY);
        GizmosForVector.DrawCoordinateSystem(transform.position + Vector3.right * 6, fullRotation);
    }
    void Update()
    {
        //colliderDistance2D=Physics2D.Distance (colliderA: firstCollider, colliderB: secondCollider);

        //colliderDistance2D = firstCollider.Distance(collider: secondCollider);

        colliderDistance2D = myRigidbody2D.Distance(collider: secondCollider);

        normal      = GizmosForVector.Round(colliderDistance2D.normal, 2);
        isValid     = colliderDistance2D.isValid;
        isOverlaped = colliderDistance2D.isOverlapped;
        pointA      = GizmosForVector.Round(colliderDistance2D.pointA, 2);
        pointB      = GizmosForVector.Round(colliderDistance2D.pointB, 2);
    }
    public ContactPoint2DSerialized(ContactPoint2D contactPoint2D)
    {
        this.collider       = contactPoint2D.collider;
        this.otherCollider  = contactPoint2D.otherCollider;
        this.rigidbody      = contactPoint2D.rigidbody;
        this.otherRigidbody = contactPoint2D.otherRigidbody;
        this.enabled        = contactPoint2D.enabled;

        this.normal           = GizmosForVector.Round(contactPoint2D.normal, 2);
        this.point            = GizmosForVector.Round(contactPoint2D.point, 2);
        this.relativeVelocity = contactPoint2D.relativeVelocity;        // GizmosForVector.Round (contactPoint2D.relativeVelocity, 2);

        this.normalImpulse    = contactPoint2D.normalImpulse;
        this.separation       = contactPoint2D.separation;
        this.tangentImpulse1M = contactPoint2D.tangentImpulse * 1000000;
    }
 void OnDrawGizmos()
 {
     GizmosForVector.VisualizeSignedAngle2D(origin: originOfVectors, from: from, to: to, lenght: 5);
 }
 void OnDrawGizmos()
 {
     GizmosForVector.VisualizeOrthonormalize(origin: originOfVectors, normal: normal, tangent: tangent, lenght: lenght);
 }
 void OnDrawGizmos()
 {
     GizmosForVector.VisualizeReflect(originOfInDirection: originOfInDirection, inDirection: inDirection, inNormal: inNormal, realScale: useRealScale);
 }
 void OnDrawGizmos()
 {
     GizmosForVector.VisualizeDot(origin: originOfVectors, lhs: lhs, rhs: rhs, realScale: useRealScale);
 }
Esempio n. 10
0
 void OnDrawGizmos()
 {
     GizmosForVector.VisualizeSlerpUnclamped(startPosition, endPosition, howfuther);
 }
Esempio n. 11
0
 void OnDrawGizmos()
 {
     GizmosForVector.VisualizeSlerp(startPosition, endPosition);
 }
Esempio n. 12
0
 void OnDrawGizmos()
 {
     GizmosForVector.VisualizeProjectOnPlane(origin: originOfVectors, vector: vector, planeNormal: planeNormal, realScale: useRealScale);
 }
 void OnDrawGizmos()
 {
     GizmosForVector.DrawVector(origin: origin, direction: direction,
                                vectorLenght: lenght, vectorColor: color, name: name);
 }
Esempio n. 14
0
 void OnDrawGizmos()
 {
     GizmosForVector.VisualizeRotateTowards(origin: origin, current: transform.up, target: endDirection);
 }
Esempio n. 15
0
 void OnDrawGizmos()
 {
     GizmosForVector.VisualizeSmoothDampPath(current: transform.position, target: targetPosition, currentVelocity: velocity,
                                             smoothTime: smoothTime, maxSpeed: maxSpeed);
 }
Esempio n. 16
0
 void OnDrawGizmos()
 {
     GizmosForVector.VisualizeProject(origin: originOfVectors, vector: vector, onNormal: onNormal, lenght: 5, realScale: useRealScale);
 }