Example #1
0
 void Update()
 {
     if (isDrawing)
     {
         endPoint = moveSrc.GetAxes();
     }
 }
Example #2
0
    void Update()
    {
        var point    = pointSrc.GetAxes();
        var rotation = rotationSrc.GetAxis() * topAngularSpeed * 10;

        t.RotateAround(point, Vector3.up, rotation);
    }
Example #3
0
    void Update()
    {
        var position = positionSrc.GetAxes();
        var vis      = visSrc.GetAxes();

        start.position = position;
        end.position   = position + vis;
    }
Example #4
0
    void Update()
    {
        var right   = rightSrc.GetAxes();
        var forward = forwardSrc.GetAxes();
        var motion  = motionSrc.GetAxes();

        force = Time.frameCount % 2 == 0? right * motion.x : forward * motion.y;
    }
Example #5
0
    void Update()
    {
        var velocity = velocitySrc.GetAxes() * topSpeed;

        if (forceIsLocal)
        {
            velocity = rigidbody.transform.rotation * velocity;
        }
        rigidbody.velocity = velocity;
    }
Example #6
0
    void Update()
    {
        var rotation = rotation2DOF.GetAxes();
        var up       = up3DOF.GetAxes();
        var right    = right3DOF.GetAxes();

        t.rotation = Time.frameCount % 2 == 0
                        ? Quaternion.AngleAxis(rotation.x * angularSpeed, up) * t.rotation
                        : Quaternion.AngleAxis(rotation.y * angularSpeed, right) * t.rotation;
    }
Example #7
0
    void Update()
    {
        var forward = forwardSrc.GetAxes();
        var up      = upSrc.GetAxes();
        var right   = rightSrc.GetAxes();
        var isLocal = isLocalSrc.GetBool();

        output.right   = isLocal ? right : Vector3.right;
        output.up      = isLocal ? up : Vector3.up;
        output.forward = isLocal ? forward : Vector3.forward;
    }
Example #8
0
 void Start()
 {
     moveSrc        = move3DOFSrcGO.GetComponent <I3DOF>();
     tapDownSrc     = tapDownEventSrcGO.GetComponent <IEvent>();
     tapUpSrc       = tapUpEventSrcGO.GetComponent <IEvent>();
     tapDownSrc.ev += () =>
     {
         isDrawing  = true;
         startPoint = moveSrc.GetAxes();
     };
     tapUpSrc.ev += () =>
     {
         isDrawing = false;
         endPoint  = startPoint;
     };
 }
Example #9
0
    public Vector3 GetAxes()
    {
        var axes = src.GetAxes();

        return(axes * axes.sqrMagnitude);
    }
Example #10
0
 public Vector3 GetAxes()
 {
     return(-src.GetAxes());
 }