#touchtapinworld 3d position

1 messages · Page 1 of 1 (latest)

narrow elbow
#

UserInputService.TouchTapInWorld:Connect(function(position, processedByUI)

how can i reliably convert a 2d screen position into a 3d world position? using mouse.Hit.Position works well most of the time, but it sometimes lags or gives the wrong result when multiple fingers are used at once

runic tusk
#

I made this a bit ago ngl I legit forgot how it works. Pretty sure its got to do ViewportPointToRay. Theres another one that does the same thing called ScreenPointToRay but for some reason that gives it an offset ViewportPointToRay is the same as mouse.Hit from what I remember see if that works.

spice breach
#

Oh ye viewport to ray

#

Forgot that name

narrow elbow
#

yeah ur right, i used ScreenPoint instead and it was just misaligning all the time

#

now it works

#

thx guys ❤️

runic tusk
#

no problemo