Hello ArtysS,
There are two ways:
You can create constraint and restrict actor rotation. See post below How do I make a pushing box - Blueprint - Epic Developer Community Forums
You can setup inertia to zero vector. I think this way is more correctly, because it has no additional restriction, but unfortunately, you should do that through physx interface
// Add ‘physx’ module dependency
#include "PxVec3.h"
#include "PxRigidBody.h"
void ANonRotatableStaticMeshActor::BeginPlay()
{
auto pComponent = Cast<UStaticMeshComponent>(RootComponent);
if (pComponent && pComponent->GetBodyInstance() && pComponent->GetBodyInstance()->GetPxRigidBody())
pComponent->GetBodyInstance()->GetPxRigidBody()->setMassSpaceInertiaTensor(physx::PxVec3(0, 0, 0));
}
Hope it helps!