.h
UPROPERTY(EditAnywhere,CateGory="Force")
FVector Force;
UPROPERTY(EditAnywhere,CateGory="TForce")
FVector TForce;
.cpp
AMyAcotr::AMyAcotr()
{
Force = FVector(0.f,0.f,0.f);
TForce = FVector(0.f,0.f,0.f);
}
void AMyAcotr::BeginPlay()
{
Cube->AddForce(Force,NAME_None,true);
Cube->AddTorqueInRadians(TForceNAME_None,true);
}