Hi,
I created a simple component. i can add the component to an actor, but i can not set its relative location. how to do that?
here is my code:
UGlowComponent::UGlowComponent()
{
LightColor = { 0.13, 0.90, 1.0f,1.0f };
PointLight = CreateDefaultSubobject<UPointLightComponent>(TEXT("Pointlight"));
PointLight->SetupAttachment(this);
PointLight->SetCastShadows(false);
PointLight->SetLightColor(LightColor);
}
Header:
UCLASS(Blueprintable, ClassGroup = (Custom), meta = (BlueprintSpawnableComponent))
class ERSTLING_API UGlowComponent : public USceneComponent
{
GENERATED_BODY()
public:
UGlowComponent();
~UGlowComponent();
UPROPERTY(BlueprintReadonly)
UPointLightComponent* PointLight;
UPROPERTY(EditDefaultsOnly)
FLinearColor LightColor;
};
And in the editor: