Ok
Changed the channel name: Adding scripts to objects
I want to make the camera rotate but I can’t attach it in code I tried to do some thing like this this.gameObject.getComponent(Camera)
by user 883276031048441917
But I couldn’t control it
by user 883276031048441917
Is that even possible?
by user 883276031048441917
The camera is another object in your scene. If you want to affect it add your component to the camera gameObject. You’ll see that it already has the „OrbitControls“ component which does the default camera controls you see in the browser
You can add your own component to it and you can also remove the OrbitControls if you want to completely control it by your component.
There are also ways to reference components from other objects but I recommend you start with the basics
yeah, What I want just to make the camera move by using the keyboard Input
by user 883276031048441917
So, I will take your advice
by user 883276031048441917
You can take a look at this sample for an example of a camera following a character which is controlled by keys
Yeah, exactly I want the camera move like the player
by user 883276031048441917
thank you. I will see who it work
by user 883276031048441917