Home Forums Game Integration Extended View altering player rotation Reply To: Extended View altering player rotation

#18729
Alex [Tobii]
Participant

Hi @tiagomcoliveira
CameraWithExtendedView property in ExtendedViewFirstPerson class is inherited from ExtendedViewBase class, which means that you can access it on ExtendedViewFirstPerson class and you don’t need to add anything. Just do something like this:


var eview = GetComponent<ExtendedViewFirstPerson>(); //or get access to this component in some other way.
Camera eviewCamera = eview.CameraWithExtendedView;
Transform eviewTransform = eviewCamera.transform;
Quaternion eviewQuat = eviewTransform.Rotation;
...

Here you can read more on object-oriented programming and inheritance in C#:
https://docs.microsoft.com/en-us/dotnet/csharp/tutorials/inheritance