Hot answers tagged

2

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.


2

This is a strange behaviour in Unity's scale inheritance system. If the parent has a non-uniform scale, when you rotate the child, they deform/stretch like a rubber band. Try adding an empty child GameObject to Player GameObject and parent the Camera GameObject to empty one, and put the rotation script on Camera. This makes parent of the Camera a ...



Only top voted, non community-wiki answers of a minimum length are eligible