Forgive my bad English.
I am new to UE4 coding. I followed this tutorial step by step for attaching a weapon to my character
But when I hit the Play,my character just froze!(In the air)
It seemed like my character’s physics did’t work.(so did inputs)
Can anybody help me out?
void ATP_ThirdPersonCharacter::BeginPlay()
{
FActorSpawnParameters SpawnParams;
SpawnParams.Owner = this;
SpawnParams.Instigator = Instigator;
AMyWeapon *WeaponSpawner = GetWorld()->SpawnActor<AMyWeapon>(WeaponSpawn,SpawnParams);
if (WeaponSpawner)
{
WeaponSpawner->AttachToComponent(GetMesh(), FAttachmentTransformRules::SnapToTargetNotIncludingScale,FName(TEXT("WeaponSlot")));
CurrentWeapon = WeaponSpawner;
}
}
![117843-d]s$$h@1j9qmjcr~5z{qsbh.jpg|1928x1056](upload://eWsUQqiRgWbDKmVeNeZgKvLQAOQ.jpeg)