Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //This time spawn location and rotation is ok. But the actor doesnt collide with the floor
- ASomeThing::ASomeThing(const FObjectInitializer &ObjectInitializer) :Super(ObjectInitializer)
- {
- Mesh = ObjectInitializer.CreateDefaultSubobject<UStaticMeshComponent>(this, TEXT("PickupMesh"));
- static ConstructorHelpers::FObjectFinder<UStaticMesh> StaticMesh(TEXT("StaticMesh'/Game/ThirdPerson/Meshes/Ramp_StaticMesh'"));
- static ConstructorHelpers::FObjectFinder<UMaterial> Material_Blue(TEXT("MaterialInstanceConstant'/Game/StarterContent/Materials/M_Water_Lake.M_Water_Lake'"));
- Mesh->SetSimulatePhysics(true);
- Mesh->SetStaticMesh(StaticMesh.Object);
- Mesh->SetMaterial(0, Material_Blue.Object);
- Mesh->GetCollisionEnabled();
- RootComponent = Mesh;
- // Set this actor to call Tick() every frame. You can turn this off to improve performance if you don't need it.
- PrimaryActorTick.bCanEverTick = true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement