Commits

Amin67v  committed 2eb247c

minor change in Camera constructor

  • Participants
  • Parent commits 57b5b42

Comments (0)

Files changed (1)

File SharpHammer/Camera.cs

 		internal cam _cam;
 
 		public Camera()
-			: this(new Vec4(0, 10, -10, 1), new Vec4(0, 0, 0, 1))
+			: this(new Vec3(0, 10, -10), new Vec3(0, 0, 0), (float)Math.PI * .3f)
 		{
 		}
 
-		public Camera(Vec4 pos, Vec4 target)
+		public Camera(Vec3 pos, Vec3 target, float fov)
 		{
 			_cam = new cam();
-			NativeCalls.cam_init(ref _cam, ref pos, ref target, 0.1f, 1000f, (float)Math.PI * .3f);
+			Vec4 cpos = new Vec4(pos, 1);
+			Vec4 ctarget = new Vec4(target, 1);
+			NativeCalls.cam_init(ref _cam, ref cpos, ref ctarget, 0.1f, 1000f, fov);
 		}
 
 	}