desertGhost_
New member
Hi,
I'm trying to restrict certain abilities that I am writing to using third person perspective only. How should I go about doing this?
What I am doing now is:
I assign the cameraController variable in awake if the character is the player character.
I restore the camera to its original parameters when the ability ends.
Is there a better way of doing this?
Thanks.
I'm trying to restrict certain abilities that I am writing to using third person perspective only. How should I go about doing this?
What I am doing now is:
I assign the cameraController variable in awake if the character is the player character.
C#:
protected override void AbilityStarted()
{
base.AbilityStarted();
if (cameraController != null)
{
startedInFPP = m_CharacterLocomotion.FirstPersonPerspective;
cameraController.SetPerspective(false);
canChangePerspectives = cameraController.CanChangePerspectives;
cameraController.CanChangePerspectives = false;
}
}
I restore the camera to its original parameters when the ability ends.
Is there a better way of doing this?
Thanks.
Last edited: