public static ARComplexCamera CreateSpringFollowCamera(GraphicsDevice device, AR3DObject unit) { ARComplexCamera c = new ARComplexCamera(device); c.cameraType = CameraType.SpringCamera; c.cameraObjOffset = new Vector3(0, 10, 40); c.lookAtOffset = new Vector3(0, 4, -8); c.follow(unit); return(c); }
public static ARComplexCamera CreateAODChaseCamera(GraphicsDevice device, AR3DObject unit) { ARComplexCamera c = new ARComplexCamera(device); c.cameraType = CameraType.AODChaseCamera; c.cameraObjOffset = new Vector3(0, 10, 40); c.lookAtOffset = new Vector3(0, 0, -1000); c.follow(unit); return(c); }
public static ARComplexCamera CreateNormalFollowCamera(GraphicsDevice device, AR3DObject unit) { ARComplexCamera c = new ARComplexCamera(device); c.cameraType = CameraType.NormalCamera; c.cameraObjOffset = new Vector3(6, 5, 20); c.lookAtOffset = new Vector3(0, 0, -1000); c.follow(unit); return(c); }
/// <summary> /// 使该相机位置和旋转与目标相机保持同步注意,如果是该相机为普通相机则永久改变位置 /// </summary> /// <param name="target"></param> public void Sync(ARComplexCamera target) { this.position = target.position; this.cameraRotation = target.cameraRotation; }