I have created a C++ with two components: UStaticMeshComponent and UBoxComponent.
// 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;
MeshComp = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("MeshComp"));
// Set the first object in the hierachy.
RootComponent = MeshComp;
CollisionComponent = CreateDefaultSubobject<UBoxComponent>(TEXT("CollisionComp"));
I have blueprinting it, and when I place it on the level and edit it and set Shape_Cube to Mesh_Comp I get this:
Thanks for your comment. Now I’m using Cube and there isn’t any offset. Is there anyway to modify Shape_Cube offset? I don’t know how to create static meshes and also, I don’t know how to set up an offset.