Been trying everything I can but nothing seems to work.
This is in my pawn class:
CameraShaker = UCameraShake::StaticClass()->GetDefaultObject<UCameraShake>();
CameraShaker->OscillationDuration = -1.0f;
CameraShaker->RotOscillation.Pitch.Amplitude = 1.0f;
CameraShaker->RotOscillation.Pitch.Frequency = 0.5f;
CameraShaker->RotOscillation.Pitch.InitialOffset = EInitialOscillatorOffset::EOO_OffsetRandom;
CameraShaker->RotOscillation.Yaw.Amplitude = 1.0f;
CameraShaker->RotOscillation.Yaw.Frequency = 0.5f;
CameraShaker->RotOscillation.Yaw.InitialOffset = EInitialOscillatorOffset::EOO_OffsetRandom;
And then I call this:
Cast<ASwatterPlayerController>(Controller)->ClientPlayCameraShake(CameraShaker->GetClass(), 1.0f);
From what I can tell, my set variables for the UCameraShake are getting squashed because of this call in CameraModifier_CameraShake.cpp:
UCameraShake* const NewInst = NewObject<UCameraShake>(this, ShakeClass);
Which just creates a default object that has OscillationDuration set to 0.
Am I doing something wrong here?