How do I get the lookvector of touchtapinworld?

Hello! So you know mouse.hit.lookvector. Its very bad on mobile so im using touchtapinworld. The problem is the position it returns is a vector2. Does anyone know how I can make this a lookvector. Just like mouse.hit.lookvector. Thanks!

1 Like

I would assume you are looking for this:

Camera -ViewportPointToRay | Documentation - Roblox Creator Hub

I think that might be it. But I am a little confused. How do I use this woth touchtapinworld?

You get the viewport/screen position from the touch tap and put it into the ViewportPointToRay method. The unit ray should give you a world direction vector.

1 Like

Oh. I still dont get it much. Do you mind providing me an example? Thanks