diff --git a/Raylib-cs/interop/Raylib.cs b/Raylib-cs/interop/Raylib.cs
index 019a703..77656d5 100644
--- a/Raylib-cs/interop/Raylib.cs
+++ b/Raylib-cs/interop/Raylib.cs
@@ -837,14 +837,11 @@ namespace Raylib_cs
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern float GetGesturePinchAngle();
+
//------------------------------------------------------------------------------------
// Camera System Functions (Module: camera)
//------------------------------------------------------------------------------------
- /// Set camera mode (multiple camera modes available)
- [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern void SetCameraMode(Camera3D camera, CameraMode mode);
-
/// Update camera position for selected mode
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void UpdateCamera(Camera3D* camera, CameraMode mode);
@@ -853,6 +850,75 @@ namespace Raylib_cs
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void UpdateCameraPro(Camera3D* camera, Vector3 movement, Vector3 rotation, float zoom);
+ /// Returns the cameras forward vector (normalized)
+ [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern Vector3 GetCameraForward(Camera3D* camera);
+
+ ///
+ /// Returns the cameras up vector (normalized)
+ /// NOTE: The up vector might not be perpendicular to the forward vector
+ ///
+ [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern Vector3 GetCameraUp(Camera3D* camera);
+
+ /// Returns the cameras right vector (normalized)
+ [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern Vector3 GetCameraRight(Camera3D* camera);
+
+
+ // Camera movement
+
+ /// Moves the camera in its forward direction
+ [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void CameraMoveForward(Camera3D* camera, float distance, CBool moveInWorldPlane);
+
+ /// Moves the camera in its up direction
+ [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void CameraMoveUp(Camera3D* camera, float distance);
+
+ /// Moves the camera target in its current right direction
+ [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void CameraMoveRight(Camera3D* camera, float distance, CBool moveInWorldPlane);
+
+ /// Moves the camera position closer/farther to/from the camera target
+ [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void CameraMoveToTarget(Camera3D* camera, float delta);
+
+
+ // Camera rotation
+
+ ///
+ /// Rotates the camera around its up vector
+ /// If rotateAroundTarget is false, the camera rotates around its position
+ ///
+ [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void CameraYaw(Camera3D* camera, float angle, CBool rotateAroundTarget);
+
+ ///
+ /// Rotates the camera around its right vector
+ ///
+ [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void CameraPitch(
+ Camera3D* camera,
+ float angle,
+ CBool lockView,
+ CBool rotateAroundTarget,
+ CBool rotateUp
+ );
+
+ /// Rotates the camera around its forward vector
+ [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void CameraRoll(Camera3D* camera, float angle);
+
+ /// Returns the camera view matrix
+ [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern Matrix4x4 GetCameraViewMatrix(Camera3D* camera);
+
+ /// Returns the camera projection matrix
+ [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
+ public static extern Matrix4x4 GetCameraProjectionMatrix(Camera3D* camera, float aspect);
+
+
//------------------------------------------------------------------------------------
// Basic Shapes Drawing Functions (Module: shapes)
//------------------------------------------------------------------------------------
@@ -1866,7 +1932,7 @@ namespace Raylib_cs
/// Check if two text string are equal
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
- public static extern bool TextIsEqual(sbyte* text1, sbyte* text2);
+ public static extern CBool TextIsEqual(sbyte* text1, sbyte* text2);
/// Get text length, checks for '\0' ending
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
diff --git a/Raylib-cs/types/Raylib.Utils.cs b/Raylib-cs/types/Raylib.Utils.cs
index 46a8b60..93e41c8 100644
--- a/Raylib-cs/types/Raylib.Utils.cs
+++ b/Raylib-cs/types/Raylib.Utils.cs
@@ -235,6 +235,15 @@ namespace Raylib_cs
}
}
+ /// Update camera movement/rotation
+ public static void UpdateCameraPro(ref Camera3D camera, Vector3 movement, Vector3 rotation, float zoom)
+ {
+ fixed (Camera3D* c = &camera)
+ {
+ UpdateCameraPro(c, movement, rotation, zoom);
+ }
+ }
+
///
/// Check the collision between two lines defined by two points each, returns collision point by reference
///