void Update() { if (isDrawing) { endPoint = moveSrc.GetAxes(); } }
void Update() { var point = pointSrc.GetAxes(); var rotation = rotationSrc.GetAxis() * topAngularSpeed * 10; t.RotateAround(point, Vector3.up, rotation); }
void Update() { var position = positionSrc.GetAxes(); var vis = visSrc.GetAxes(); start.position = position; end.position = position + vis; }
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; }
void Update() { var velocity = velocitySrc.GetAxes() * topSpeed; if (forceIsLocal) { velocity = rigidbody.transform.rotation * velocity; } rigidbody.velocity = velocity; }
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; }
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; }
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; }; }
public Vector3 GetAxes() { var axes = src.GetAxes(); return(axes * axes.sqrMagnitude); }
public Vector3 GetAxes() { return(-src.GetAxes()); }