In Needle we can get azimuthal/polar angle of OrbitControls, but can’t set azimuthal/polar angle. We also logged OrbitControls object in console and couldn’t find these methods. (please see images below)
Raw three.js has setAzimutalAngle method, but seems like Needle doesn’t. How can we achieve it (setting angles) ?
Our target is extend orbital movement of camera, so camera should be snapped to cube side, which is closer to viewport
the correct code would be this.context.mainCameraComponent.gameObject.getComponent(OrbitControls) note that you dont insert a string but the type that you want - it is (OrbitControls) and NOT ('OrbitControls') when getting a component
alternatively you can also use GameObject.findObjectOfType(OrbitControls) if you want to search it in the whole scene (it’s ok if you do that once, you shouldnt query for it every frame for example)
You can totally install three-stdlib to your project and use that if you feel more comfortable with that (you can wrap it in a small Behaviour and apply that to your camera instead of our core OrbitControls behaviour)