I’ve created a really simple UObject subclass that serves as a container for firing off a bunch of player feedback events:
UCLASS(Blueprintable, editinlinenew)
class MYGAME_API UPlayerFeedbackEvent : public UObject
{
public:
GENERATED_UCLASS_BODY()
/** Animation */
UPROPERTY(Category = "Player Feedback Event", EditAnywhere, BlueprintReadWrite)
class UAnimMontage* animation;
/** Effect */
UPROPERTY(Category = "Player Feedback Event", EditAnywhere, BlueprintReadWrite)
class UParticleSystem* effect;
/** Sound */
UPROPERTY(Category = "Player Feedback Event", EditAnywhere, BlueprintReadWrite)
class USoundBase* sound;
/** Rumble */
UPROPERTY(Category = "Player Feedback Event", EditAnywhere, BlueprintReadWrite)
class UForceFeedbackEffect* rumble;
/** Camera Shake */
UPROPERTY(Category = "Player Feedback Event", EditAnywhere, BlueprintReadWrite)
class UCameraShake* cameraShake;
void AttachToActor(const AActor* actor, const FName attachPoint = "");
void PlayAtLocation(const FVector location);
};
I was able to create a Blueprint instance of this new class in the editor:
I also created a new camera shake:
However, the camera shake I created does not show up in the picker for the new class I created.
Am I doing something wrong?
Also, I can’t seem to figure out a way to set a rumble (force feedback) reference. Is there a way to define force feedback in a blueprint and reference it here?