i know basics of course as you can see i did that script. by the way i think i didnt nderstand that your comment because of my english. You mean mouse look object is like first person controller for example?
There are basics and then there are basics. You cannot say that you know everything needed when you obviously don’t.
Anyway, there is a GameObject with your MouseLook Script on it. You’ll have to drag it from the hierarchy view to the property named “Mouse Look” that appears on your script in the inspector. With that, you build a reference to the component.
Nah, you need to click on the object that has your script on it and check out the inspector (should be on the right).
There is a line that says “Mouse Look”. That’s where you have to drag the object into.
No, it has to be the object with the mouse look script in it.
Should be the first person controller and the Main Camera.
And since they’re two objects, you need another MouseLook variable in your script.
Take some time to check out how the First Person Controller works.
Trying to use it in any way other than what you get out of the box without understanding how it works will get you nowhere.
The Mouse Look thing in the first person controller consists of two components on the FPS GameObjects.
One you’ll find when clicking on the “First Person Controller”, one on “Main Camera”.
These Components are what enable the player to look around using the Mouse.
Disable them (i.e. by unchecking the checkboxes besides their names) will disable Mouse Look.
To do this by script, you need two variables:
Then you drag the GameObjects “First Person Controller” and “Main Camera” from your Hierarchy to the properties in the inspector, add the enabled = false or true thing to both variables in the right place and that’s it.
As said, take some time to understand the Components you’re currently using before finally solving this. You’ll have more from that.