I’m Really just starting Unreal and I’m having some really basic issues
I’ve got a class I made in c++, it has a sphere collider and it triggers it’s function and works fine.
I put a scene component on it to be a visual representation, a sphere.
......... UPROPERTY() USceneComponent* OurVisibleComponent; .........
...... // Create and position a mesh component so we can see where our sphere is UStaticMeshComponent* SphereVisual = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("VisualRepresentation")); SphereVisual->AttachTo(RootComponent); SphereVisual->SetRelativeLocation(FVector(0.0f, 0.0f, 0.0f)); SphereVisual->SetWorldScale3D(FVector(0.8f)); SphereVisual->SetCollisionProfileName(TEXT("Trigger")); ........
This worked as far as I know, I could see the sphere.
I now wanted to change the colour of the sphere when it’s walked over, so I created a material with a base colour of green.
And then I put that as the material of the sphere using the editor (drag and drop) and the sphere is green in the preview, but disappears when I hit play.
Is there something obvious I’ve missed? Am I going about this wrong?