-4
\$\begingroup\$

I was watching a tutorial on how to move objects on mouse movement. https://youtu.be/7OJQ6MbHuvQ

this is the link to that tutorial and below is the error I got while scripting. Please watch the whole tutorial to understand.

enter image description here

\$\endgroup\$

1 Answer 1

2
\$\begingroup\$

This is the signature of the function you're trying to use

Vector3.Project(Vector3 vector, Vector3 onNormal)

you're passing it only 1 parameter. And this is the first problem. The latter is that a Vector3 does not contain a Camera property.

\$\endgroup\$
2
  • 1
    \$\begingroup\$ He probably needs to do Vector3.Project(toObjectVector, Camera.position.forward); \$\endgroup\$ Commented May 20, 2016 at 13:17
  • \$\begingroup\$ think the same :) \$\endgroup\$ Commented May 20, 2016 at 13:24

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.