I can set almost any property of my AStaticMeshActor * but I didn’t manage to find any light related propertie like cast shadows.
Any idea?
I can set almost any property of my AStaticMeshActor * but I didn’t manage to find any light related propertie like cast shadows.
Any idea?
Hi!
You don’t set the property on the StaticMeshActor itself but its component.
AStaticMeshActor* Actor;
UStaticMeshComponent* Component = Actor->GetStaticMeshComponent();
if(Component) {
Component->CastShadow = false;
}
Thank you so much I managed to force lighting from the object by
Component->LightmassSettings.bUseEmissiveForStaticLighting = true;
unfortunatly besides this option is checked on the editor it doesn’t emit light on lightmass solution, same mesh, with same material and same options works ok if I make it manually.
Any idea on this?
Note: if I make changes on this option manually but I created the actor using code it doesn’t work neither.
Upps it looks a ‘feature’ or a bug on Unreal, if I set it to invisible during gameplay it doesn’t render properly on lightmass