How can I spawn an actor where my player and camera is facing?

So here’s the deal, I have a cube actor with simulate physics on and I want to be able to spawn it in front of player where it’s facing or looking, but I also want it so no player or actor can move it. How can I do this?

just make it really heavy then. to spawn in front of player just call GetActorForwardVector() and multiply it with some distance that you desired from player, and add the location of your player to the location of the cube actor. it’s just like this ::

FVector actorForwardVectorMulDistance = player->GetActorForwardVector() * Distance;
FVector actorLocation = player->GetActorLocation() + actorForwardVectorMulDistance;

that’s the idea…