SkillViewerCameraSetting.GetRotation C# (CSharp) Method

GetRotation() public method

public GetRotation ( ) : Quaternion
return Quaternion
    public Quaternion GetRotation()
    {
        GameObject obj = new GameObject();
        obj.transform.position = GetCurrentBezierCameraOffset() - new Vector3(0, up, 0);
        obj.transform.LookAt(Vector3.zero);
        return obj.transform.rotation;
    }

Usage Example

 public void MoveToLookat(Vector3 target, bool bSmoothMove)
 {
     followPose.pos = target + cameraSetting.GetCurrentBezierCameraOffset();
     followPose.rot = cameraSetting.GetRotation();
     startPos.pos   = camera.transform.position;
     startPos.rot   = camera.transform.rotation;
     SetState(State.ToLookat);
     timeToStartSwitch = Time.time;
     timeToEndSwitch   = timeToStartSwitch + Pose.GetScale(20.0f, 90.0f, startPos, followPose);
 }