CameraShake is now MatineeCameraShake as of 4.26

Just a heads up to anyone unable to find the old CameraShake class shown in the video lecture when creating a new blueprint class.

A new base class for camera shake, called UCameraShakeBase, has been created. It offers a few basic pieces of logic (managing time, blending, play space, and scaling of shake) to make writing sub-classes easier. All the core engine APIs now take and return this base class. The old camera shake class is now renamed UMatineeCameraShake, since it contains a Matinee camera animation.

12 Likes

Here is a diff to fix the compilation errors when you use 4.26:

Index: Source/ToonTanks/Actors/ProjectileBase.h
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/Source/ToonTanks/Actors/ProjectileBase.h b/Source/ToonTanks/Actors/ProjectileBase.h
--- a/Source/ToonTanks/Actors/ProjectileBase.h	(revision 933743c9e7d3c6bfe2470d20a2abb66fd6e9ad2a)
+++ b/Source/ToonTanks/Actors/ProjectileBase.h	(date 1614405083114)
@@ -35,7 +35,7 @@
 	UPROPERTY(EditAnywhere, Category = "Effects")
 	USoundBase* LaunchSound;
 	UPROPERTY(EditAnywhere, Category = "Effects")
-	TSubclassOf<UCameraShake> HitShake;
+	TSubclassOf<UMatineeCameraShake> HitShake;
 
 	// FUNCTIONS
 	UFUNCTION()
Index: Source/ToonTanks/Pawns/PawnBase.cpp
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/Source/ToonTanks/Pawns/PawnBase.cpp b/Source/ToonTanks/Pawns/PawnBase.cpp
--- a/Source/ToonTanks/Pawns/PawnBase.cpp	(revision 933743c9e7d3c6bfe2470d20a2abb66fd6e9ad2a)
+++ b/Source/ToonTanks/Pawns/PawnBase.cpp	(date 1614405490154)
@@ -57,7 +57,7 @@
 	// Play death effects particle, sound and camera shake. 
 	UGameplayStatics::SpawnEmitterAtLocation(this, DeathParticle, GetActorLocation());
 	UGameplayStatics::PlaySoundAtLocation(this, DeathSound, GetActorLocation());
-	GetWorld()->GetFirstPlayerController()->ClientPlayCameraShake(DeathShake);
+	GetWorld()->GetFirstPlayerController()->ClientStartCameraShake(DeathShake);
 }
 
 void APawnBase::PawnDestroyed()
Index: Source/ToonTanks/Pawns/PawnBase.h
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/Source/ToonTanks/Pawns/PawnBase.h b/Source/ToonTanks/Pawns/PawnBase.h
--- a/Source/ToonTanks/Pawns/PawnBase.h	(revision 933743c9e7d3c6bfe2470d20a2abb66fd6e9ad2a)
+++ b/Source/ToonTanks/Pawns/PawnBase.h	(date 1614405164833)
@@ -36,7 +36,7 @@
 	UPROPERTY(EditAnywhere, Category = "Effects")
 	USoundBase* DeathSound;
 	UPROPERTY(EditAnywhere, Category = "Effects")
-	TSubclassOf<UCameraShake> DeathShake;
+	TSubclassOf<UMatineeCameraShake> DeathShake;
 
 public:
 	// Sets default values for this pawn's properties

6 Likes

Thank you!

And it becomes LegacyCameraShake from v5.1…

Unreal Engine 5.1 Release Notes | Unreal Engine 5.1 Documentation

But I found that I can use the Wave Oscillator Camera Shake Pattern as Root Shake Pattern in DefaultCameraShake. The settings are almost the same and easy to understand.

Privacy & Terms