-3
\$\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\$

closed as off-topic by Alexandre Vaillancourt, jgallant, MichaelHouse May 20 '16 at 15:39

This question appears to be off-topic. The users who voted to close gave these specific reasons:

  • "Programming questions that aren't specific to game development are off-topic here, but can be asked on Stack Overflow. A good rule of thumb is to ask yourself "would a professional game developer give me a better/different/more specific answer to this question than other programmers?"" – MichaelHouse
  • "Questions about debugging a problem in your project must present a concise selection of code and context so as to allow a reader to diagnose the issue without needing to read all of your code or to engage in extensive back-and-forth dialog. For more information, see this meta thread." – Alexandre Vaillancourt, jgallant
If this question can be reworded to fit the rules in the help center, please edit the question.

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\$
  • 1
    \$\begingroup\$ He probably needs to do Vector3.Project(toObjectVector, Camera.position.forward); \$\endgroup\$ – jgallant May 20 '16 at 13:17
  • \$\begingroup\$ think the same :) \$\endgroup\$ – Leggy7 May 20 '16 at 13:24

Not the answer you're looking for? Browse other questions tagged or ask your own question.