Added GetForward to Camera C# interface.
GetForward gets the forward according to Camera's last calculated view matrix
This commit is contained in:
parent
a45432ef66
commit
39910afa54
|
@ -114,7 +114,14 @@ namespace SHADE
|
||||||
system->CameraLookAt(*GetNativeComponent(), Convert::ToNative(targetPosition));
|
system->CameraLookAt(*GetNativeComponent(), Convert::ToNative(targetPosition));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Vector3 Camera::GetForward()
|
||||||
|
{
|
||||||
|
auto system = SHSystemManager::GetSystem<SHCameraSystem>();
|
||||||
|
SHVec3 forward, up, right;
|
||||||
|
system->GetCameraAxis(*GetNativeComponent(), forward, right, up);
|
||||||
|
return Convert::ToCLI(forward);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
|
@ -65,5 +65,6 @@ namespace SHADE
|
||||||
void SetMainCamera(size_t directorIndex);
|
void SetMainCamera(size_t directorIndex);
|
||||||
void SetMainCamera();
|
void SetMainCamera();
|
||||||
void LookAt(Vector3 targetPosition);
|
void LookAt(Vector3 targetPosition);
|
||||||
|
Vector3 GetForward();
|
||||||
};
|
};
|
||||||
}
|
}
|
Loading…
Reference in New Issue