implement method to check if world position is within camera view

This commit is contained in:
Ruan Lucas
2022-10-02 00:02:56 -04:00
parent 76a66cf400
commit 6af6649f70
2 changed files with 26 additions and 0 deletions

View File

@@ -168,6 +168,13 @@ public:
/// <param name="viewport">The viewport.</param>
API_FUNCTION() void ProjectPoint(const Vector3& worldSpaceLocation, API_PARAM(Out) Float2& cameraViewportSpaceLocation, API_PARAM(Ref) const Viewport& viewport) const;
/// <summary>
/// Checks if the 3d point of the world is in the camera's field of view.
/// </summary>
/// <param name="worldSpaceLocation">World Position (XYZ)</param>
/// <returns>Returns true if the point is within the field of view</returns>
API_FUNCTION() bool CheckPointIsOnView(const Vector3& worldSpaceLocation) const;
/// <summary>
/// Converts the mouse position to 3D ray.
/// </summary>