URadiantAutoNotifyModifier#
Functions#
Public#
Called when applying the modifier to the animation sequence
virtual void OnApply_Implementation(UAnimSequence* AnimationSequence) override final;Called when reverting the modifier from the animation sequence
virtual void OnRevert_Implementation(UAnimSequence* AnimationSequence) override final;virtual void PostLoad() override final;virtual void BeginDestroy() override final;Private#
void RemoveTracks(UAnimSequence& Sequence);Remove all added tracks from this modifier from the animation sequence
void UpdateNotifyTrack(UAnimSequence& Sequence);Updates all tracks from this modifier, may add or remove tracks
TMap<FName, TNonNullPtr<FAnimNotifyTrack>> AddTracks(UAnimSequence& Sequence);Add tracks from this modifier to the animation sequence
TNonNullPtr<FAnimNotifyTrack> AddTrack(UAnimSequence& Sequence, TOptional<FName> BoneName);Add a single track to the animation sequence, may specify a bone as reference
Determine the distance of a location to the detection shape. Most commonly a bone Location.
float GetDistanceToDetectionShape(const FVector& boneLocation);void OnPreviewSceneChanged();Updates the modifier in case the previewscene in the animation editor has changed. Retriggers an update to all debug visuals
void UpdateDetectionShapeDebugProxy();Triggers an update to the detection shape debug drawing proxy
void UpdateNotifyDebugProxy(const TArray<FVector>& notifyLocations);Triggers an update to the proxy for drawing notify trigger locations
void OnNotifyChanged();Triggers whenever a notify on the edited animation sequence is changed
Properties#
Private#
UPROPERTY(EditAnywhere, Category= "Track")
FName NotifyTrackName = "Radiant Notify";Base Trackname used to identify added tracks from this modifier, is conjoined with the bonename
UPROPERTY(EditAnywhere, Category= "Track")
FColor TrackColor = FColor(255,0,0);Color of the added track
UPROPERTY(EditAnywhere, Category= "Placement")
TSet<FName> TargetBones = {"ball_r", "ball_l"};Target bones used for detection
UPROPERTY(EditAnywhere, Category= "Settings")
TSoftClassPtr<UAnimNotify> AppliedNotifyType;The placed notify type
UPROPERTY(EditAnywhere, Category= "Placement")
EPlacementType PlacementMode = EPlacementType::First;The mode used to determing when notifies need to be placed in a continuous frame range
UPROPERTY(EditAnywhere, Category= "Settings")
uint8 OneTrackPerBone : 1 = true;Create on Notifytrack for every bone that gets notifies applied
UPROPERTY(EditAnywhere, Category= "Placement")
uint8 ClipFirstFrame : 1 = true;Prevents notifies to be placed on the first frame of the Animation Sequence
UPROPERTY(EditAnywhere, Category= "Placement")
uint8 ClipLastFrame : 1 = true;Prevents Notifies to be placed on the last frame of the Animation Sequence
UPROPERTY(EditAnywhere, Category= "Detection")
EDetectionShape DetectionShape;The shape used to detect if the notify may be placed
UPROPERTY(EditAnywhere, Category= "Detection", meta=(EditCondition="DetectionShape==EDetectionShape::Plane", EditConditionHides))
FVector PlaneDirection = FVector::DownVector;Direction of the plane detection shape
UPROPERTY(EditAnywhere, Category= "Detection", meta=(EditCondition="DetectionShape==EDetectionShape::Plane", EditConditionHides))
FVector PlaneLocation = FVector::ZeroVector;Location of the plane detection shape
UPROPERTY(EditAnywhere, Category= "Detection", meta=(EditCondition="DetectionShape==EDetectionShape::Sphere", EditConditionHides))
FVector SphereCenter = FVector::ZeroVector;Direction of the sphere detection shape
UPROPERTY(EditAnywhere, Category= "Detection", meta=(EditCondition="DetectionShape==EDetectionShape::Sphere", EditConditionHides))
float SphereRadius = 50.f;Radius of the plane detection shape
UPROPERTY(EditAnywhere, Category= "Detection", meta=(EditCondition="DetectionShape==EDetectionShape::Sphere", EditConditionHides))
FName SphereAncorBone = "pelvis";Bone the sphere detection shape is anchored to throughout the animation sequence