GetMouseRay is GetScreenToWorldRay now
This commit is contained in:
parent
4095b22ff8
commit
315b0139e8
2 changed files with 9 additions and 2 deletions
|
|
@ -408,9 +408,9 @@ public static unsafe partial class Raylib
|
|||
|
||||
// Screen-space-related functions
|
||||
|
||||
/// <summary>Get a ray trace from mouse position</summary>
|
||||
/// <summary>Get a ray trace from screen position (i.e mouse)</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern Ray GetMouseRay(Vector2 mousePosition, Camera3D camera);
|
||||
public static extern Ray GetScreenToWorldRay(Vector2 position, Camera3D camera);
|
||||
|
||||
/// <summary>Get camera transform matrix (view matrix)</summary>
|
||||
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
|
|
|
|||
|
|
@ -1322,4 +1322,11 @@ public static unsafe partial class Raylib
|
|||
{
|
||||
model.Materials[materialIndex].Shader = shader;
|
||||
}
|
||||
|
||||
/// <summary>Get a ray trace from mouse position</summary>
|
||||
[ObsoleteAttribute("This method is obsolete. Call GetScreenToWorldRay instead.")]
|
||||
public static Ray GetMouseRay(Vector2 mousePosition, Camera3D camera)
|
||||
{
|
||||
return GetScreenToWorldRay(mousePosition, camera);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue