Vector3D viewOffset; //for camera shake; #endregion Fields #region Constructors public Camera() { this.random = new Random(); this.position = new Vector3D(0, 0, 0); this.viewOffset = new Vector3D(0, 0, 0); this.rotation = 0; this.scale = 1; this.shakeIntensity = 0; }
//How to get from this to other public Vector3D getDifference(Vector3D other) { return new Vector3D(other.x - this.x, other.y - this.y, other.z - this.z); }
//Get the distance between two vectors public float getDistance(Vector3D other) { Vector3D difference = this.getDifference(other); return (float)Math.Sqrt(difference.x*difference.x + difference.y*difference.y + difference.z*difference.z); }
public Camera() { position = new Vector3D(0, 0, 0); rotation = 0; scale = 1; }