From 659b02215bab7358f4ca66e6c51822f7ce1aa6d6 Mon Sep 17 00:00:00 2001 From: EmeraldSlash Date: Sat, 28 Aug 2021 09:37:39 +1200 Subject: [PATCH] Added missing info --- README.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d66446e..8c4f78f 100644 --- a/README.md +++ b/README.md @@ -630,7 +630,13 @@ bool RbxMouse.FILTER_VISIBLE_OR_CANCOLLIDE(RaycastResult result) # Contrived examples -More complicated raycasting with any ray, RaycastParams, and a filter function: +Perform a simple raycast, hitting anything: + +```lua +local result = RbxMouse:GetTarget() +``` + +More complicated raycasting with RaycastParams, a filter function, and a ray: ```lua -- Ignore the player's character. local params = RaycastParams.new() @@ -644,6 +650,9 @@ local ray = Ray.new(origin, direction) local result = RbxMouse:GetTarget(params, RbxMouse.FILTER_CANCOLLIDE, ray) ``` +As you can see, RbxMouse is flexible enough that you can use it as a +raycasting library in its own right. + Raycasting from center of screen and only hitting very specific parts: ```lua