Class AZagalaSpecExamplesTriggerSphereActor#

Inheritance Relationships#

Base Type#

  • public AActor

Class Documentation#

class AZagalaSpecExamplesTriggerSphereActor : public AActor#

Trigger Sphere System Under Test (SUT).

A small physics actor that can be launched toward a checkpoint with a one-shot impulse. Stores the original spawn location and launch impulse so the actor can be reset and re-launched for multi-activation scenarios.

Public Functions

AZagalaSpecExamplesTriggerSphereActor(const FObjectInitializer &ObjectInitializer = FObjectInitializer::Get())#
void Launch(FVector Impulse)#

Apply a one-shot linear velocity impulse.

Records the impulse so ResetToOrigin can reproduce it.

Parameters:

Impulse – The impulse to store in CachedImpulse and apply on subsequent ticks.

virtual void BeginPlay() override#
virtual void Tick(float DeltaTime) override#
void ResetToOrigin()#

Teleport back to SpawnLocation and re-apply the stored launch impulse.

Use between activation attempts in multi-activation scenarios.

Public Members

FVector SpawnLocation = FVector::ZeroVector#

The location where this actor was first spawned (set by Launch on first call or manually).

FVector CachedImpulse = FVector::ZeroVector#

The impulse applied by the last Launch() call; used by ResetToOrigin().

TObjectPtr<USphereComponent> SphereCollision#

Root physics-simulated sphere collision component.