ue4 c 2b 2b overlapping functions cpp setup

Solutions on MaxInterview for ue4 c 2b 2b overlapping functions cpp setup by the best coders in the world

showing results for - "ue4 c 2b 2b overlapping functions cpp setup"
Luigi
18 Oct 2018
1ALightSwitchTrigger::ALightSwitchTrigger()
2{
3 	// Set this actor to call Tick() every frame.  You can turn this off to improve performance if you don't need it.
4	PrimaryActorTick.bCanEverTick = true;
5
6	LightIntensity = 3000.0f;
7
8	PointLight = CreateDefaultSubobject<UPointLightComponent>(TEXT("Point Light"));
9	PointLight->Intensity = LightIntensity;
10	PointLight->bVisible = true;
11	RootComponent = PointLight;
12
13	LightSphere = CreateDefaultSubobject<USphereComponent>(TEXT("Light Sphere Component"));
14	LightSphere->InitSphereRadius(300.0f);
15	LightSphere->SetCollisionProfileName(TEXT("Trigger"));
16	LightSphere->SetupAttachment(RootComponent);
17
18	LightSphere->OnComponentBeginOverlap.AddDynamic(this, &ALightSwitchTrigger::OnOverlapBegin);
19	LightSphere->OnComponentEndOverlap.AddDynamic(this, &ALightSwitchTrigger::OnOverlapEnd); 
20
21}
22
similar questions