Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How to make a more precise mouse.hit.p?

Asked by 4 years ago

The title explains it. Thanks!

2
I think that's the more precise we can get, as its the only way on getting the mouse target position Leamir 3138 — 4y
0
Alright. I will see if anyone else can tell me othervise alexfinger21 341 — 4y
0
wise* alexfinger21 341 — 4y
0
Note: You can edit your comment by clicking on its text Leamir 3138 — 4y
View all comments (5 more)
0
Oh wow, thanks! alexfinger21 341 — 4y
0
Can you elaborate? What do you mean more precise? I don't think that exists? Mouse.Hit is the CFrame of the Mouse in 3D space. Mouse.Hit.p is the Vector3 position of the CFrame in 3D space. It's pretty precise.  legoguy939 418 — 4y
0
FYI, Mouse.Hit.p is deprecated, use Mouse.Hit.Position (or CFrame.Position) qVoided 221 — 4y
0
hey, there is a way using userinputservice and making a ray and then extending it and stuff, let me find a link to it. Erie20 102 — 4y
0
https://developer.roblox.com/en-us/api-reference/function/Camera/ScreenPointToRay at the bottom it shows a code sample of how to use it for mouse.hit.position. The ScreenPointToRay draws a ray, however that ray is limited length so we just amke a new normal ray to replace itm Erie20 102 — 4y

Answer this question