BattleTank/Source/BattleTank/Private/SprungWheel.cpp
// Called when the game starts or when spawned
Called when the game starts or when spawned
Called when the game starts or when spawned
void ASprungWheel::BeginPlay()
{
	Super::BeginPlay();
	if (SpringConstraint && AxleToWheelConstraint && Wheel && Axle)
	{
		Wheel->SetNotifyRigidBodyCollision(true);
		Wheel->OnComponentHit.AddDynamic(this, &ASprungWheel::OnHit);
		SetupSpringConstraint();
	}
}
void ASprungWheel :: BeginPlay ( ) { Super :: BeginPlay ( ) ; if ( SpringConstraint && AxleToWheelConstraint && Wheel && Axle ) { Wheel -> SetNotifyRigidBodyCollision ( true ) ; Wheel -> OnComponentHit . AddDynamic ( this , & ASprungWheel :: OnHit ) ; SetupSpringConstraint ( ) ; } }
Called when the game starts or when spawned
Called when the game starts or when spawned