Hi all,
I simply need a system pictured below. A drawing pad at the low 1/3 of the phone. User draws something on it by touching and dragging.
Everything on internet based on ortographic camera but I need something works with perspective camera.
How can I do it with perspective cam?
Get the finger ray off the camera in the same exact way as with ortho, but instead, cast it against a Plane
object. NOT a visible Plane primitive but the Plane struct, which is a mathematical invisible plane.
From that you get a float distance back and use that to ask “What is the world position of this ray at distance X?” and there is your world position.
https://docs.unity3d.com/ScriptReference/Plane.Raycast.html
ALWAYS use the named arguments in Plane since they are easy to inadvertently swap around and then you’ll be mysteriously puzzled as to why it no longer works.
thanks but my knowledge was not enough to understand the answer.
I’m not sure what to tell you. There isn’t any more or less to the answer I gave above.
The answer I gave is both the required minimum AND nothing more than the minimum and will work all day long.
up